The solution to the problem that mysql comments are garbled Chinese characters: first use the "show variables like" command to check the character set settings of the database and server; then execute the statement "set collation_server=utf8_general_ci;".
Recommendation: "mysql video tutorial"
mysql table comment garbled code
Question
Execute statement: alter table TABLE_XXX comment '中文号';
Result: use information_schema;
select * from TABLES where TABLE_SCHEMA=’mydb’ and TABLE_NAME=’TABLE_XXX’ TABLE_XXX 的注释为乱码
Check System
Use show variables like “%colla%”; show varables like “%char%”; these two commands to view the character set settings of the database and server
Modify
set collation_server=utf8_general_ci; set collation_connection=utf8_general_ci;
The above is the detailed content of What should I do if mysql comments are garbled in Chinese?. For more information, please follow other related articles on the PHP Chinese website!