MySQL Green Edition encoding and 1067 error details, mysql1067

Source: Internet
Author: User
Tags change settings dedicated server

MySQL Green Edition encoding and 1067 error details, mysql1067

MySQL Green Edition encoding and 1067 Error

View MySQL Encoding

SHOW VARIABLES LIKE 'char%';

Because the character set is set to UTF8 at the time of installation, all codes are UTF8.

  • Character_set_client: the data you send must be consistent with the encoding specified by the client !!! The server uses this encoding to interpret the data sent from the client;
  • Character_set_connection: This encoding is consistent with that of the client! This encoding will not cause garbled characters! When a query statement is executed, the data sent by the client is first converted to the encoding specified by connection. However, as long as the data sent by the client is consistent with the encoding specified by the client, the conversion will not be faulty;
  • Character_set_database: the default database encoding. If no encoding is specified during database creation, the database encoding is used by default;
  • Character_set_server: default encoding of the MySQL server;
  • Character_set_results: encoding of the response, that is, the encoding that the query result returns to the client. This indicates that the client must use the encoding specified by result for decoding;
If character_set_client, character_set_results, and character_set_connection are set to GBK, no garbled characters will appear. However, you only need to modify character_set_client and character_set_results.

The console encoding can only be GBK, but cannot be changed to UTF8, which leads to a problem. The data sent by the client is GBK, while character_set_client is UTF8. This indicates that garbled characters will occur when the client data reaches the server. Since you cannot modify the console encoding, you can only change character_set_client to GBK.

The data sent by the server to the client is encoded as character_set_result. If it is UTF8, garbled characters will occur when the console uses GBK decoding. Because the console encoding cannot be modified, character_set_result can only be modified to GBK.
Fill in this sentence:

The overall configuration is as follows:

# 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 install, and will be replaced if you# *** upgrade to a newer version of MySQL.[mysqld]basedir = H:\MySQLdatadir = H:\MySQL\datacharacter_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=3306default-character-set = gbk

Error 1067

Note that the configuration in my. ini should not be wrong. In fact, many of the errors we encounter are errors in my. ini.

Note:

In Windows 10, set default-character-set = utf8, and then perform operations in cmd without garbled characters. However, garbled characters are displayed in windows8.1 and windows7. Therefore, you must set default-character-set = gbk to gbk in windows8.1 and windows7.

Thank you for reading this article. I hope it will help you. Thank you for your support for this site!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.