In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Mysql how to set and view the character set, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
1. List all character sets supported by MYSQL:
SHOW CHARACTER SET
two。 Current MYSQL server character set settings
SHOW VARIABLES LIKE 'character_set_%'
3. Current MYSQL server character set check settings
SHOW VARIABLES LIKE 'collation_%'
4. Show a character set setting
Show create database database name
5. Show a datasheet character set setting
Show create table table name
6. Modify database character set
Alter database database name default character set 'utf8'
7. Modify datasheet character set
Alter table table name default character set 'utf8'
8. Specify the character set when building the library
Create database database name character set gbk collate gbk_chinese_ci
9. Specify the character set when creating the table
CREATE TABLE `code` (
`id` TINYINT (255) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
`content` VARCHAR (255) NOT NULL
) TYPE = MYISAM CHARACTER SET gbk COLLATE gbk_chinese_ci
Library character set, the following code is missing in my.cnf:
[client]
Default-character-set=utf8
[mysqld]
Default-character-set=utf8
After reading the above, have you mastered how to set and view the character set in mysql? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.