Set the character encoding of MySql5.5 database to UTF8 to solve Chinese garbled characters. in the mysql compression directory, there is a bunch of parameter configuration files, such as: my-small.ini, copy this file, change the name, such as: my. ini 2. open my. in the INI file, add the following parameter: [client]: add the default-character-set = utf8 parameter [client] # password = [your_password] port = 3306 socket =/tmp/mysql. sock default-character-set = utf8 [mysqld]: add the following three parameters: www.2cto.com [mysqld] default-storage-engine = INNODB character-set-server = utf8 collation-server = utf8_general_ci # generic configuration options port = 3306 socket =/tmp/ mysql. sock 3. restart the mysql service. after connecting to your database, enter the command: show variables like '% char %'; to view the character set used by your database.