When in django admin panel i try to add something in database using russian symbols - it gives me error:
(1366, "Incorrect string value: '\\xD0\\xB2\\xD1\\x84\\xD1\\x8B' for column 'name' at row 1")
Request Method: POST
Request URL: https://giver.md/dev/admin/gift/categoryru/add/
Django Version: 1.10.4
Exception Type: OperationalError
Exception Value:
(1366, "Incorrect string value: '\\xD0\\xB2\\xD1\\x84\\xD1\\x8B' for column 'name' at row 1")
Exception Location: /home/ubuntu/giver/server/local/lib/python2.7/site-packages/MySQLdb/connections.py in defaulterrorhandler, line 36
Python Executable: /home/ubuntu/giver/server/bin/python2
Python Version: 2.7.12
I know, that i need to change collation to resolve this problem? But how can i collate al tables in my mysql database using ubuntu 16? I tryed this, but this didn't helped me:
SELECT CONCAT("ALTER TABLE ", TABLE_NAME," COLLATE utf8_general_ci") AS ExecuteTheString
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA="giver"