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.