English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Method of Modifying MySQL Default Character Set Encoding

Today I encountered the problem of modifying the default character set encoding of MySQL again, and it was solved after half a day of trouble. I hurried to write it down so that I don't have to trouble it every time in the future.

The command to view the MySQL character set is "show variables like '%char%';".

In MySQL5.6For example, the default character set is:

In the work, it is necessary to change all the character sets to utf8.

The following is the method of modification:

1.Open the installation directory, the default is in "C:\Program Files\MySQL\MySQL Server 5.6”

2.Copy a copy of "my-default.ini

3.Add a line "default" under [mysqld] and [client]-character-set=utf8”

4.Save the configuration file and restart MySQL.

Re-login to the command window and check again:

We see that it has all been changed to utf8.

The above-mentioned is the method of modifying the default character set encoding of MySQL introduced by the editor for everyone. I hope it will be helpful to everyone. If you have any questions, please leave a message, and the editor will reply to everyone in time. I am also very grateful to everyone for their support of the Yanaohua tutorial website!

Declaration: The content of this article is from the Internet, and the copyright belongs to the original author. The content is contributed and uploaded by Internet users spontaneously, and this website does not own the copyright, has not been manually edited, and does not assume any relevant legal liability. If you find any content suspected of copyright infringement, please send an email to notice#w.3Please report via email to codebox.com (replace # with @) and provide relevant evidence. Once verified, this site will immediately delete the infringing content.

You May Also Like