In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you "MySQL Chinese how to configure", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "MySQL Chinese how to configure" this article.
1. The character set settings for the fields in the table. Show create table TableName or show full columns from tableName
> show create table T1
+-
| | Table | Create Table |
+-
| | T1 | CREATE TABLE `t1` (
`id`int (11) NOT NULL
`c1` varchar (30) DEFAULT NULL
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk |
+-
1 row in set (0.00 sec)
Mysql > show full columns from T1
+-
| | Field | Type | Collation | Null | Key | |
+-
| | id | int (11) | NULL | NO | PRI | |
| | C1 | varchar (30) | gbk_chinese_ci | YES |
+-
2 rows in set (0.00 sec)
Mysql >
two。 The current connection system parameter show variables like 'char%'
Mysql > show variables like 'char%'
+-
| | Variable_name | Value |
+-
| | character_set_client | gbk |
| | character_set_connection | gbk |
| | character_set_database | latin1 |
| | character_set_filesystem | binary |
| | character_set_results | gbk |
| | character_set_server | latin1 |
| | character_set_system | utf8 |
| | character_sets_dir | C:/Program File |
+-
8 rows in set (0.00 sec)
Mysql >
a. In Chinese, please make sure that the character set of this field in the table is compatible with Chinese:
Big5 | Big5 Traditional Chinese
Gb2312 | GB2312 Simplified Chinese
Gbk | GBK Simplified Chinese
Utf8 | UTF-8 Unicode
b. Make sure that the join parameters are consistent with the field character set, and you can use setname' charsetname'
For example, set name 'gbk'
This command also modifies the character_set_client,character_set_connection,character_set_results
(if your MySQL is all in Chinese, you can add or modify this parameter in my.ini or my.cnf. You need to restart the MySQL service after modifying the parameter file.)
[mysql]
Default-character-set=utf8
The above is all the contents of the article "how to configure MySQL in Chinese". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.