How to compile a SQL query that converts the table column from cp1251 to utf8. My database and all the tables in it with the encoding of utf8, but the information inside on cp1251. Because of this information is displayed incorrectly. A simple change of the encoding in the settings turns them into other incomprehensible symbols. I tried to change DEFAULT CHARESET
in the dump, but it did not help either :( Maybe there are other methods?
Part of the database:
I did so:
- mysqldump -u mysql -p conference_db --allow-keywords --create-options --complete-insert --default-character-set=utf8 --add-drop-table > dump.sql
- All ... DEFAULT CHARESET=utf8 changed to ... DEFAULT CHARESET=cp1251 (in CREATE TABLE)
- mysql -u mysql -p conference_db --default-character-set=cp1251 < dump.sql