MySQL Error:/usr/sbin/mysqld:unknown variable ' Default-character-set=utf8 '

Source: Internet
Author: User
Tags mysql login

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 '

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.