In windows mysql 5.7 to modify the encoding to UTF-8 method steps, mysqlutf-8

Source: Internet
Author: User

In windows mysql 5.7 to modify the encoding to UTF-8 method steps, mysqlutf-8

Preface

When I first started learning MySQL, I downloaded the latest version 5.7.14 from the official website. When I entered the Chinese language using cmd, an error was reported. So I started to modify the default mysql encoding (in windows). Let's take a look at the detailed modification methods.

The method is as follows:

First passShow variables like 'character _ set _ % ';View mysql character sets

The default encoding is latin1.

Close the database.

Find the my. ini file in the mysql installation directory.

Add

[Client] default-character-set = utf8

In[Mysqld]Add

Character-set-server = utf8

Restart mysql

You can change the default encoding of the mysql database to UTF-8.

Many resources on the Internet are[Mysqld]Add

Default-character-set = utf8

If this is done, mysql 5.7 cannot be enabled.

So you need to change

Character-set-server = utf8

Note:After modification, all data in the database must be deleted before use.

Summary

The above is all the content of this article. I hope the content of this article will help you in your study or work. If you have any questions, please leave a message, thank you for your support.

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.