Mysql method to change the database character encoding: first call up "Run" and enter cmd; then log in to the database and view the database; finally modify the character set of the database, the code is [mysql>use mydb].
Related free learning: mysql database(Video )
Mysql method to change database character encoding:
1. Win R, call up "Run", enter cmd, and press Enter
2. Mysql method to change database character encoding
Log in to the database,
3.View Database
4. Check the database character encoding
5. Modify through the MySQL command line: (encoding optional)
mysql> set character_set_client=utf8; mysql> set character_set_connection=utf8; mysql> set character_set_database=utf8; mysql> set character_set_results=utf8; mysql> set character_set_server=utf8; mysql> set character_set_system=utf8; mysql> set collation_connection=utf8; mysql> set collation_database=utf8; mysql> set collation_server=utf8;
6. Of course:
Modify the character set of the database mysql>use mydb
mysql>alter database mydb character set utf8;
7. Create a database and specify the database Character set
mysql>create database mydb character set utf8;
The above is the detailed content of How to change the character encoding of the database in mysql. For more information, please follow other related articles on the PHP Chinese website!