Navicat for MySQL display Chinese garbled solution

Source: Internet
Author: User

navicat for MySQL display Chinese garbled solution

Recently encountered a problem, using Navicat for MySQL to open the database is all displayed garbled (in the program code before inserting data to ensure that characters are not garbled), encountered problems in the search for a solution, Baidu has not solved for a long time, the online solutions are not suitable for my problem, Most of the solution on the Internet is to right-click a connection in the Navicat, select the connection properties, switch to the Advanced tab, remove the "use MySQL character set" before the tick, in the code to select Utf-8, this method for some problems may be appropriate, but my garbled problem still exists, So I changed the Utf-8 to gbk,gb2312, all the questions still remain the same.
Later, with a programmer of the old programmer consulted, he said there may be a problem with the configuration file MySQL, is in the MySQL installation directory in the My.ini file in the default encoding problem, will be My.ini file the default code in both places
==========================================
[MySQL]
Default-character-set=utf8 <------
==========================================
[Mysqld]
# The TCP/IP Port the MySQL Server would listen on
port=3306
#Path to installation directory. All paths is usually resolved relative to this.
Basedir= "C:/Program files/mysql/mysql Server 5.0/"
#Path to the database root
Datadir= "C:/Program files/mysql/mysql Server 5.0/data/"
# The default character set that would be used if a new schema or table is
# created and no character set is defined
Default-character-set=utf8 <------
===========================================
The arrow refers to the place to ensure that the UTF8 (note is not utf-8), navicat in the use of the MySQL character set (at this time no longer select Utf-8 encoding), the problem is resolved! My familiar Chinese characters are back! Any friend who wants to meet the same problem, hope to help.

Navicat for MySQL display Chinese garbled solution

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.