Mysql 5.5 Character Set Problems

Source: Internet
Author: User


Mysql 5.5 is installed, and the character set is faulty. The previous mysql servers can be configured in the my. cnf configuration file. However, an error is reported even though this is not the case:
At that time, no error logs were configured in the system, so you can configure the location of the error logs first to see where the error occurred:
[Html] user = mysql pid-file =/var/run/mysqld. pid socket =/var/run/mysqld. sock port = 3306 www.2cto.com basedir =/usr datadir =/var/lib/mysql tmpdir =/tmp log-error =/var/log/mysql/error. log lc-messages-dir =/usr/share/mysql skip-external-locking default-character-set = utf8: [html] [ERROR]/usr/sbin/mysqld: unknown variable 'default-character-set = utf8'. I don't even know about it. I found that some people also encountered this problem, saying that mysql in mysql 5.5 no longer uses the default-character-set method. Please see: http://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_default-character-set
Change default-character-set = utf8 to character-set-server = utf8. [Html] root @ chenDBA:/etc/mysql # vim my. cnf root @ chenDBA:/etc/mysql # service mysql start/running, process 5904 root @ chenDBA:/etc/mysql # mysql-uroot-p Enter password: www.2cto.com mysql> show variables like 'character % '; + ------------------------ + bytes + | Variable_name | Value | + -------------------------- + bytes + | character_set_client | Utf8 | character_set_connection | utf8 | character_set_database | utf8 | bytes | binary | bytes | utf8 | bytes | utf8 | character_set_system | utf8 | bytes |/usr/share/ mysql/charsets/| + -------------------------- + ---------------------------- + 8 rows in set (0.00 sec) OK. Author: chen861201

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.