Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How linux modifies the encoding of mysql

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "how linux modifies the code of mysql". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Linux modify mysql encoding methods: 1, view the mysql character set; 2, through "default-character-set=utf8" to modify the mysql server encoding; 3, restart the mysql service.

The operating environment of this paper: linux5.9.8 system, mysql5.5, Dell G3.

System: Aliyun

1. View the mysql character set

Input: show variables like 'character_set_%'

Second, modify the code of a certain database

Input: alter database dbname default character set utf8

3. Modify the coding of mysql server

Input: vi / etc/my.cnf

Add the following code to the yellow area:

Default-character-set=utf8 [client] default-character-set=utf8 IV. Restart the mysql service

Input: service mysqld restart

5. Check again

Input: show variables like 'character_set_%'

This is the end of the content of "how linux modifies the code of mysql". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report