Linux install mysql and modify Chinese garbled characters

I used mongodb database before, but now I change to mysql database. ? ? , here's what you think:

View character set status

show variables like 'character_set%';

 

 Recommended except

character_set_filesystem | binary 

 Everything else is set to utf-8

Written as utf8 under the terminal, mysql terminal does not support '-'.

It is best to install version 5.5 of mysql, because my.cnf needs to be modified because of the garbled problem.

 

wrote
sudo gedit /etc/my.cnf

 The 5.6 version of my.cnf has no corresponding setting items, which is troublesome and not recommended for beginners.

in my.cnf

[client]  [mysql] [mysqld]

add under

default-character-set=utf8

 

 Just restart the service

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327077260&siteId=291194637