问题:可以显示中文,但是在mysql-client 客户端输入不了中文。
1.字符为utf-8
Server characterset: utf8Db characterset: utf8Client characterset: utf8Conn. characterset: utf8
有两个版本的mysql,一个为5.5版本,一个为5.6 版本。5.5 的可以,5.6 的不行。比较了一下status 命令的输出,发现版本处参数有点不一样。
5.6 Ver 14.14 Distrib 5.6.27, for debian-linux-gnu (x86_64) using EditLine wrapper
5.5 是using readLine 6.0
http://dev.mysql.com/doc/refman/5.6/en/source-configuration-options.html#option_cmake_with_editline
-
-DWITH_READLINE=
bool
Whether to use the
readline
library bundled with the distribution. This option was removed in MySQL 5.6.5 becausereadline
is no longer bundled.
解决方案:
事实上,讲原来的mysql-server mysql-client 卸载更换为 mysql-community-server mysql-community-client 之后就ok 了
更换后的版本为:
mysql Ver 14.14 Distrib 5.6.27, for Linux (x86_64) using EditLine wrapper
Server version: 5.6.27-log MySQL Community Server (GPL)