MySQL green version setting code, and 1067 error View MySQL encoding SHOW VARIABLES LIKE 'char%'; Because the character set was specified as UTF8 during installation, all encodings are UTF8.
Modify character_set_client, character_set_results, character_set_connection to GBK, There will be no garbled characters. But in fact, you only need to modify character_set_client and character_set_results. The console encoding can only be GBK and cannot be changed to UTF8, which causes a problem. The data sent by the client is GBK, and character_set_client is UTF8, which means that the client data will be garbled when it reaches the server. Since the console encoding cannot be changed, the only option is to change character_set_client to GBK. The data that the server sends to the client is encoded as character_set_result. If it is UTF8, garbled characters will appear when the console uses GBK decoding. Because the console encoding cannot be modified, the only option is to change character_set_result to GBK. Here is the overall configuration: # For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during installation, and will be replaced if you # *** upgrade to a newer version of MySQL. [mysqld] basedir = H:\MySQL datadir = H:\MySQL\data character_set_server = utf8 # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. # basedir = ..... # datadir = ..... # port = ..... # server_id = ..... # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES [client] port=3306 default-character-set = gbk Error 1067 Be careful not to make mistakes in the configuration in my.ini. In fact, many of our 1067 errors are caused by mistakes in the my.ini configuration. Remark: In Windows 10, you can actually set default-character-set = utf8, and then there will be no garbled characters when performing operations in cmd. But in Windows 8.1 and Windows 7, the characters will be garbled. Therefore, in Windows 8.1 and Windows 7, default-character-set = gbk must be set to gbk Thank you for reading, I hope it can help you, thank you for your support of this site! You may also be interested in:
|
<<: Using Docker Enterprise Edition to build your own private registry server
>>: Five ways to traverse JavaScript arrays
Recently I want to use native JS to implement som...
HTML forms are used to collect different types of...
In the database, both UNION and UNION ALL keyword...
Physically speaking, an InnoDB table consists of ...
Chinese Tutorial https://www.ncnynl.com/category/...
I have previously introduced to you the configura...
Overview I have recently started learning MySQL r...
Union is a union operation on the data, excluding...
Getting Started with Data Volumes In the previous...
Table of contents 1. Introduction to pid-file 2.S...
Table of contents Preface 1. Less 2. Import your ...
Code example: public class JDBCDemo3 { public sta...
Introduction yum (Yellow dog Updater, Modified) i...
Effect: First create five vue interfaces 1.home.v...
Problem Description 1. Database of the collection...