MySQL databaseIf you do not selectCharacter delimiter setGb2312, utf, or gbk may cause garbled characters. This article describes how to set the character collation set as follows:
Solution:
Start --> Run --> cmd --> enter the doscommand form: (if the command cannot be executed, put the installation path of mysql at the beginning of the path of the system variable)
Mysql Export command:
- Mysqldump-hlocalhost-P3306-uroot-p123456 -- default-character-set = gb2312 mysql> F:/pushingdb. SQL
Mysql import command:
- Mysql-uroot-p123456 -- default-character-set = gb2312 test <F:/pushingdb. SQL
Note: "root" indicates the database user name, "123456" indicates the database password, "mysql" indicates the database name, and "F:/pushingdb. SQL" indicates the location to which the database is exported;
In this way, through the above settings, we can avoid some garbled characters in the MySQL database.