Sometimes, because the encoding needs to modify the mysql encoding, it is easier to modify the graphic interface in windows. For linux, you can refer to the following method.
Sometimes, because the encoding needs to modify the mysql encoding, it is easier to modify the graphic interface in windows. For linux, you can refer to the following method.
After logging on to mysql by default
Mysql> show variables like '% character % ';
Copy/usr/share/doc/mysql-server-5.1.52/my-large.cnf to/etc/my. cnf
Command: cp/usr/share/doc/mysql-server-5.1.52/my-large.cnf/etc/my. cnf
Add default-character-set = utf8 under [client]
Add default-character-set = utf8 under [mysqld]
Even if the above changes are made, if the database directly creates a table and then stores the table in Chinese, the question mark is obtained. The solution is to specify the default Character Set utf8 when creating a database, for example:
Create database test default character set utf8;