In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to solve the problem of mysql modifying my.ini error report, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
The solution for mysql to modify my.ini error: first, change the default code of mysql to utf8mb4, and modify the [my.ini] configuration; then modify the variable and check whether the setting is successful.
Mysql's solution to modify the my.ini error:
The process of changing the default encoding of mysql to utf8mb4 is as follows:
Turn off the mysql service
Modify the my.ini configuration file (the modification method is written below) and save it as ANSI encoding
Start the mysql service
Modify the variable, (the setting method is written below)
Check whether the setting is successful (the check method is written below)
Modify the my.ini configuration: (you only need to pay attention to part of the utf8mb4 configuration, other parts of the configuration do not need to refer to mine)
[mysqld] character-set-client-handshake = FALSE character-set-server = utf8mb4collation-server = utf8mb4_unicode_ci init_connect='SET NAMES utf8mb4'sql_mode= "STRICT_TRANS_TABLES NO_ENGINE_SUBSTITUTION "default_storage_engine=innodbinnodb_buffer_pool_size=1000Minnodb_log_file_size=50Minnodb_file_format=barracudainnodb_file_per_table=trueinnodb_large_prefix=truemax_allowed_packet=500M# sets the installation directory of mysql:\ mysql-5.6.40-winx64# sets the data storage directory of the mysql database datadir=D:\ mysql-5.6.40-winx64\ data# the maximum number of connections allowed max_connections=200 [mysql] default-character-set = utf8mb4 [client] default-character-set = utf8mb4
Modify variable method:
Just execute the following sql
Set character_set_client = utf8mb4;set character_set_connection = utf8mb4;set character_set_database = utf8mb4;set character_set_results = utf8mb4
Check the method for setting up successfully:
Execute sql
SHOW VARIABLES WHERE Variable_name LIKE 'character_set_%' OR Variable_name LIKE' collation%'
The result shows that it is successful.
The above is all the contents of how to solve the problem of mysql modifying my.ini error, 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.