How to modify the online installation of mysql①
Modify the code and set it to utf-8
Add the following content under [mysqld] in the mysql configuration file /etc/my.cnf (no need to copy)
init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake
②Restart the mysqld service
service mysqld restart
③ Verify that the code is indeed modified as in offline mode;
show variables like 'char%';