ERROR 2019 (HY000): Can't initialize character set gb2312
Out for ages, MySQL will reload twice, No. tragedy. . .
Before setting up the system are all UTF-8 encoding of the
vi /etc/sysconfig/i18n
LANG=zh_CN.UTF-8
LANGUAGE=zh_CN.UTF-8:zh_CN.GB2312:zh_CN
SUPPORTED=zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en
SYSFONT=lat0-sun16
Database has been configured utf8
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EXTRA_CHARSETS:STRING=utf8,gbk \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DENABLED_LOCAL_INFILE=ON \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_READLINE=1 \
-DENABLED_LOCAL_INFILE=1 \
-DMYSQL_DATADIR=/var/mysql/data
I do not know how to smoke a gb2312
for a long time and finally found the problem should be content encoded input terminal, think of before in order to allow SSH modify the normal display Chinese
vi /etc/profile
LANG=zh_CN.GB2312
export LANG
This place is modified to reason, then it will be commented and then close the ssh command is executed after re-link normal,
o ()︿)) o 唉. .
Reproduced in: https: //my.oschina.net/zhouz/blog/213103