Mysql: unknownvariable 'character-set-client = utf8' _ MySQL

Source: Internet
Author: User
On the MySQL server installed by colleagues (the old version of the My-SQL5.1.73 is installed), login MySQL encountered the following mysql: unknownvariable #39; character-set-clientutf8 #39; error: [root @ MySQLDB002lib] # mysql-uroot... on the MySQL server installed by a colleague (the old version of My-SQL 5.1.73 was installed), the following "MySQL: unknown variable 'character-set-client = utf8' "error:

[Root @ MySQLDB002 lib] # mysql-u root-p

Mysql: unknown variable 'character-set-client = utf8'

Check MySQL configuration file/etc/my. cnf found

[root@MySQLDB002 lib]# more /etc/my.cnf [mysqld]datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sockuser=mysql# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0default-character-set=utf8character-set-server=utf8[client]default-character-set=utf8character-set-client=utf8[mysql]default-character-set=utf8[mysqld_safe]log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid

According to some information on the Internet, this is a bug in mysqlbinlog. However, no relevant information is found in the search for foreign documents. although I still did not fully understand the reason, however, you may wish to verify the following solutions of the supervisor.

Solution 1: block character-set-client = utf8. the MySQL statement is correct.

Solution 2: Use the loose-default-character-set = utf8 loose-option. the loose is loose, casual, and free. the loose -, when the program does not recognize this option, it will skip this option and give a warning. The test can also solve the problem.

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.