Set the character encoding of MySql5.5 database to UTF8 to solve Chinese garbled characters _ MySQL
Source: Internet
Author: User
Set the character encoding of the MySql5.5 database to UTF8 to solve Chinese garbled characters. bitsCN.com
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 [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.
BitsCN.com
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.