MySQL UTF8 way connection view table data garbled problem

Source: Internet
Author: User
Cause

Today in the company for the first time link a new MySQL database, I see in spring configured in JDBC Datasource.url configuration Characterencoding=utf8. Then use navicat Open Select UTF8 link database, results see table data Chinese all garbled ...

Solutions

You can use show variables like ' Character_set_database' and show create table Yourtablename to see the Database and table encodings: Then I found out that we were using UTF8MB4 ... Then select the corresponding encoding on the line. or choose automatic encoding (I used to manually select the specified encoding).

Please refer to the difference between UTF8 and UTF8MB4 50041603

According to this article, the JDBC URL can be written UTF8. So there is no problem in Java, but a link tool on GG

MySQL UTF8 way connection view table data garbled problem

Related Article

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.