Mysql after the reload appears garbled set to UTF8 can be resolved _mysql

Source: Internet
Author: User
View current connection system parameters: 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:/

+--------------------------+----------------
8 rows in Set (0.00 sec)
Mysql>

The database and server character sets can only be set to UTF8 in the configuration file, otherwise it will not work

On the command line: Stop command: net stop MySQL

Start command: net start MySQL
MySQL Core configuration file My.ini

[MySQL] main configuration command line client parameters Default-character-set=utf8----affect client, connection, result
[mysqld] Configure server parameters CHARACTER-SET-SERVER=UTF8-----affect database server

When MySQL adds function functions, set the set global Log_bin_trust_function_creators=1 first; Specify parameters otherwise the creation is unsuccessful

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.