In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
First, view the character set
Mysql > show variables like 'character%'
+-+
| | Variable_name | Value |
+-+
| | character_set_client | utf8 |
| | character_set_connection | utf8 |
| | character_set_database | latin1 |
| | character_set_filesystem | binary |
| | character_set_results | utf8 |
| | character_set_server | latin1 |
| | character_set_system | utf8 |
2. To avoid garbled code, change the default character set to UTF-8
/ usr/local/mysql-5.7.19-macos10.12-x86_64/support-files
Most articles on the Internet say that copy a .cnf file in this directory to / etc and change it to my.cnf file, but there is no .cnf file in 5.7.19 version of this directory (5.7.17 version has .cnf file). The official website gives instructions to remove this file. Then we will manually create the my.cnf file under / etc.
Create a my.cnf file under / etc with the following contents (if it cannot be saved, use the sudo vim command)
[client]
Default-character-set=utf8
[mysql]
Default-character-set=utf8
[mysqld]
Collation-server=utf8_unicode_ci
Init-connect='SET NAMES utf8'
Character-set-server=utf8
4. After restarting mysql, check that the character set has been modified. If you want to modify it to Chinese, then change the corresponding content to gb2312.
Mysql > show variables like 'character%'
+-+
| | Variable_name | Value |
+-+
| | character_set_client | utf8 |
| | character_set_connection | utf8 |
| | character_set_database | utf8 |
| | character_set_filesystem | binary |
| | character_set_results | utf8 |
| | character_set_server | utf8 |
| | character_set_system | utf8 |
5. Some friends may not succeed after creating my.cnf in / etc, so create a my.cnf file under / private/etc.
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
Step 1: select SessionOption from the Option menu.
© 2024 shulou.com SLNews company. All rights reserved.