# mysqlbinlog mysql-bin.000004 mysqlbinlog: unknown variable ‘default-character-set=utf八’

mysql: unknown variable ‘character-set-client=utf8’,charactersetutf8

在同事安装的MySQL服务器上(居然安装的是My-SQL
5.壹.7三的老旧版本),登陆MySQL时遇上上边“mysql: unknown variable
‘character-set-client=utf八’”错误:

[[email protected] lib]# mysql -u root -p

 

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

反省MySQL的配备文件/etc/my.cnf发掘

[[email protected] lib]# more /etc/my.cnf 

 

[mysqld]

 

datadir=/var/lib/mysql

 

socket=/var/lib/mysql/mysql.sock

 

user=mysql

 

# Disabling symbolic-links is recommended to prevent assorted security risks

 

symbolic-links=0

 

default-character-set=utf8

 

character-set-server=utf8

 

[client]

 

default-character-set=utf8

 

character-set-client=utf8

 

[mysql]

 

default-character-set=utf8

 

[mysqld_safe]

 

log-error=/var/log/mysqld.log

 

pid-file=/var/run/mysqld/mysqld.pid

 

互连网有材料说这么些是mysqlbinlog的三个bug,然则搜索外文资料并不曾找寻到相关新闻,固然依旧并从未根本弄精通开始和结果,不过无妨自身申明了1晃底下两种减轻地点

 

斩草除根办法一:屏蔽character-set-client=utf8,此时接连MySQL语句没不寻常。

 

消除措施2:使用loose-default-character-set=utf八loose-选项,loose为宽松的, 散漫的,
自由的情致,在选拔前加了loose-,则当程序不认得此选项时会略过此选项,并交付1个告诫。测试能够消除难点。

 

参照他事他说加以调查资料:

http://outofcontrol.ca/blog/comments/change-mysql-5.5-default-character-set-to-utf8

http://www.itokit.com/2011/1213/72763.html

 

http://www.bkjia.com/Mysql/1059265.htmlwww.bkjia.comtruehttp://www.bkjia.com/Mysql/1059265.htmlTechArticlemysql: unknown variable
‘character-set-client=utf八’,charactersetutf8在同事安装的MySQL服务器上(居然安装的是My-SQL
伍.一.7三的老旧版本),登陆MySQL时遇见下…

 

# mysqlbinlog mysql-bin.000004 
mysqlbinlog: unknown variable 'default-character-set=utf8'

 加上–no-defaults

# mysqlbinlog --no-defaults mysql-bin.000004

 难题化解!

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图