How to solve Chinese garbled MySQL database Problems

Source: Internet
Author: User

In the past two days, students have conducted a JPA experiment to insert Chinese characters into the database. During the query, the database is garbled and the database is garbled. I posted a large number of questions.

The reason is that no encoding is selected during installation, so you can modify the encoding.

Find the installation directory, for example, C:/program files/MySQL Server 5.0, which is the default installation directory.

Find the my. ini file. Maybe your system hides the suffix, that is, find the file my.

Open my. ini and edit it. Find "default-character-set = Latin1", and change it to "default-character-set = GBK.

Restart the MySQL database service and create a garbled database table again.This step must be done. The modified configuration file is valid only when it is restarted.

Li xucheng csdn blog:Http://blog.csdn.net/javaeeteacher
Csdn student base camp:Http://student.csdn.net/space.php? Uid = 1, 124362
If you like myArticleAdd me as a friend:Http://student.csdn.net/invite.php? U= 124362 & C = 7be8ba2b6f3b6cc5

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.