mysql5.5.3 and above modify default encoding after start failure

Source: Internet
Author: User

I. Background of the problem

After installing 5.6.21 MySQL, there is a coding problem.

Show variables like '%character% '; display character_set_database and character_set_server values are latin1;

By set character_set_server= ' UTF8 ', again the view is actually utf8, but there are still coding errors,

After restarting the MYSQLD service, review the value of the variable and revert to latin1.

Ii. process of Settlement

Edit the My.cnf file.

<!-- lang: shell -->[mysqld]default-character-set=utf8

Restart Mysqld. Cannot restart after shutdown, view error log ***.local.err file.

<!-- lang: shell -->2015-05-08 00:52:49 58000 [ERROR] /usr/local/mysql/bin/mysqld: unknown variable ‘default-character-set=utf8‘2015-05-08 00:52:49 58000 [ERROR] Aborting

Confirm that the word is not spelled correctly.

Third, problem solving

Search Discovery
Default-character-set This attribute is obsolete in mysql5.0, 5.5.3 removed.
Http://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_default-character-set

Revision changed to

 <!-- lang: shell -->[mysqld]character-set-server=utf8

Restart Mysqld, encoding problem solved.

mysql5.5.3 and above modify default encoding after start failure

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.