MySQL does not support GBK encoding.

Source: Internet
Author: User
In Linux, MySQL5.1 installed with packages does not support GBK encoding. It only supports UTF8 encoding. Specific performance: the error "ERROR1273" is displayed when a database encoded with GBK is opened.

In Linux, MySQL5.1 installed with packages does not support GBK encoding. It only supports UTF8 encoding. Specific performance: When opening a database encoded with GBK, the ERROR 1273 is displayed.

In Linux, MySQL5.1 installed with packages does not support GBK encoding. It only supports UTF8 encoding. Specific performance:

When you open a database encoded with GBK, the following message is displayed:

ERROR 1273 (HY000): Unknown collation 'gbk _ chinese_ci 'in table 'data _ plus' definition

Set names gbk; and SET character_set_client = gbk; prompt:

ERROR 1115 (42000): Unknown character set: 'gbk'

Finally, I had to use ports to re-compile.

Cd/usr/ports/databases/mysql51-server

Make WITH_CHARSET = gbk WITH_XCHARSET = all WITH_COLLATION = gbk_chinese_ci BUILD_STATIC = yes install clean

(In fact, when make install clean, there is a parameter prompt, you can set the first three .)

View supported codes:

Show variables like 'character _ set _ % ';

Show variables like 'collation _ % ';

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.