Modify mysql8.0 in Linux system The default encoding of 0 is utf8

chnhbhndchngn 2022-02-13 08:18:12 阅读数:829

modify mysql8.0 mysql linux default

Linux Installed mysql8.0 Some of the default codes are Latin , Not and store Chinese , View encoding

mysql> show variables like '%character%';

  Need to use root user , modify /etc/my.cnf file

stay [mysqld] Add below

collation_server = utf8_general_ci
character_set_server = utf8

Then save to exit

Restart mysql Program , 

service mysqld restart

Start again mysql client , View encoding


copyright:author[chnhbhndchngn],Please bring the original link to reprint, thank you.