Get the App
SLTechnology News&Howtos  ›  Database  › 

Mysql then modifies the character set of the field

Shulou Source: shulou.com Published: 2022-05-31 10:44:27 10月04日 Update

In this article, the editor introduces in detail "mysql and then modify the character set of the field", the content is detailed, the steps are clear, and the details are handled properly. I hope that this "mysql then modify the character set of the field" article can help you solve your doubts.

Method: 1, open the "my.ini" file, add "default-character-set=utf8" under client; 2, add "default-character-set=utf8" under mysql; 3, modify the contents of mysqld and restart.

The operating environment of this tutorial: windows10 system, mysql8.0.22 version, Dell G3 computer.

How does mysql modify the character set of a field

Modify MySQL configuration file

Find the my.ini file

After going in, add the configuration in three places.

The first one:

[client] default-character-set=utf8

Second:

[mysql] default-character-set=utf8

The third:

[mysqld] character-set-client-handshake = FALSE character-set-server = utf8 collation-server = utf8_unicode_ci init_connect='SET NAMES utf8'

Restart the MySQL service

This computer-- > Administration-- > Services and applications-- > Services-- > mysql Services-- > restart

Enter a command

Show variables like'% char%'

You can view the mysql character set

After reading this, the article "mysql and then modify the character set of the field" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.

Tags: Characters character sets fields services content files articles three computers configurations proper commands places applications ideas tutorials new knowledge methods more steps Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Docker Apple Linux macOS