When you modify the character set of MySQL, in order to set the default character set to Utf-8, you add a line Default-character-set=utf8 under/etc/my.cnf [mysqld].
But the next time you start the system, MySQL login is not, error can ' t connect to local MySQL serverthrough socket '/var/lib/mysql/mysql.sock ' (2),
The Mysql.sock #find/-name mysql.sock is then searched by command,
The file is not found, and the Mysqld service is started before it is generated.
Then see if mysqld starts #sudo service mysqld status
Mysqld Service did not start successfully, view log file/var/log/mysqld.log
Found an error:/usr/sbin/mysqld:unknown variable ' Default-character-set=utf8 '
This error is caused by the [mysqld] setting character set under the/ETC/MY.CNF configuration file, and the workaround: Change Default-character-set=utf8 to Character_set_server=utf8
Reboot the system.
Do not modify under [client]
MySQL Error:/usr/sbin/mysqld:unknown variable ' Default-character-set=utf8 '