ERROR 2019 (HY000): Can ' t initialize character set gb2312
engaged in a very half-day, MySQL has been reloading two times, the number of tragedies ...
Before the system code was set, it was all UTF-8.
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
The database has also 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 don't know how to get a gb2312.
Looking for a long time finally found that should be the terminal input content encoding problem, remember before in order to let SSH normal display of Chinese modified
Lang=zh_cn. GB2312
Export LANG
This place has been changed for a reason, so it's okay to comment it out and then turn off SSH relink to execute the command.
Ps:mysql Import Garbled Solution
garbled when importing, you need to add the encoding format for the specified import data in the statement:
MYSQL-UROOT-P database_name < Database_backup.sql--default-character-set=utf8