Solution to MySQL5 Character Set Problems

Source: Internet
Author: User
The following article mainly introduces a more convenient method to implement the MySQL5 character set. The following describes the problem of the MySQL5 character set and its actual solution, I hope this will help you in your future studies. I hope you will gain some benefits after browsing. Today, I opened the slave log and found a bunch of errors, all of which are: [ERROR] Slave: ErrorCharac

The following article mainly introduces a more convenient method to implement the MySQL5 character set. The following describes the problem of the MySQL5 character set and its actual solution, I hope this will help you in your future studies. I hope you will gain some benefits after browsing. Today, I opened the slave log and found a bunch of errors, all of which are: [ERROR] Slave: Error 'charac

The following article mainly introduces a more convenient method to implement the MySQL5 character set. The following describes the problem of the MySQL5 character set and its actual solution, I hope this will help you in your future studies. I hope you will gain some benefits after browsing.

Today, I opened the slave log and found a bunch of errors, all of which are like this:

[ERROR] Slave: Error 'character set' #28 'is not a compiled Character set and is not specified in the'/usr/local/MySQL (best combination with PHP) /share/MySQL (the best combination with PHP)/charsets/Index. xml (standardization is getting closer and closer) 'file' on query.

I wrote the insert Statement on the master (linux) machine and found that synchronization was okay. Later, I inserted data on the window with a MySQL (best combination with PHP) client, the above problems began to emerge. View slave log discovery through MySQL (the best combination with PHP) binlog

If you insert data to a client using gbk encoding, the following logs are generated:

SET @ session. character_set_client = 28, @ llation_connection = 33, @ llation_server = 8 /*! */;

If insert is written directly in linux, the above 28 (gbk) will become 8 (latin-swde)

The reason should be that the MySQL (best combination with PHP) client uses gbk encoding, which cannot be identified by the server. Although you can use '/usr/local/MySQL (the best combination with PHP)/share/MySQL (the best combination with PHP)/charsets/Index. xml (standardization is getting closer and closer) 'find gbk, but through show character set; it can be seen that the database does not list gbk.

Bytes

Then

Cd/usr/local

Mv MySQL (the best combination with PHP)-old

Tar xzvf mysql(and PHP combination of )-5.0.37-linux-i686-glibc23.tar.gz

Mv MySQL (best combination with PHP)-5.0.37-linux-i686-glibc23 MySQL (best combination with PHP)

Start MySQL (the best combination with PHP), and everything will be OK.

  

The above content is an introduction to the problem of the MySQL5 Character Set and the solution. I hope you will find some gains.

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.