The perfect solution to the Chinese garbled characters in mysql6.x under win7

The perfect solution to the Chinese garbled characters in mysql6.x under win7

1. Stop the MySQL service in the command line: net stop mysql stop mysql

2. Modify my.ini in the mysql installation directory and change default-character-set=latin to default-character-set=gbk (change several to several, I don't know if it is possible to change to utf-8)

3. Copy the newly modified my.ini to the C:\Windows directory and overwrite it.

4. Start the MySQL service in the command line: net start mysql , enter MySQL

5. Input: show variables like 'char%'; see which ones are latin

6. For example: character_set_database是latin , then enter set character_set_database=gbk ; until there is no latin. (Note: character_set_filesystem and character_set_system cannot be changed)

7. Only databases built after this will support Chinese encoding, so the original database can be deleted and rebuilt (I don’t know how to modify the encoding of a specified database yet).

Related references:

MySQL 5.6 (Win7 64-bit) download, installation and configuration graphic tutorial

How to configure php+Apache+mysql environment in win7 system

The above is the perfect solution to the Chinese garbled characters in mysql6.x under win7 introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and I will reply to you in time. Thank you very much for your support of the 123WORDPRESS.COM website!

You may also be interested in:
  • MySQL 5.6 (Win7 64-bit) download, installation and configuration graphic tutorial
  • MySQL 5.7 installation and configuration tutorial under Windows 7
  • MySQL download, installation, configuration and use tutorial detailed version (win7x64)
  • How to configure php+Apache+mysql environment in win7 system
  • Brief introduction to building apache+php+mysql development environment under win7
  • Win7 64-bit system configuration php latest version development environment (php+Apache+mysql)
  • Detailed explanation of win7+apache+php+mysql environment configuration operation
  • Win7 system installation MySQL5.5.21 graphic tutorial

<<:  Detailed explanation of the application of Docker Swarm in continuous integration testing

>>:  Vue SPA first screen optimization solution

Recommend

Sample code for implementing multi-application deployment using tomcat+nginx

Table of contents Multi-application deployment 1-...

JavaScript implements mouse drag to adjust div size

This article shares the specific code of JavaScri...

Vue+openlayer5 method to get the coordinates of the current mouse slide

Preface: How to get the coordinates of the curren...

js canvas realizes random particle effects

This article example shares the specific code of ...

Web page custom selection box Select

Everyone may be familiar with the select drop-dow...

Detailed explanation of the group by statement in MySQL database group query

1: Statement order of grouping function 1 SELECT ...

MySQL SQL statement performance tuning simple example

MySQL SQL statement performance tuning simple exa...

Implementation code for operating mysql database in golang

Preface Golang provides the database/sql package ...

Share JS four fun hacker background effect codes

Table of contents Example 1 Example 2 Example 3 E...

MySQL aggregate function sorting

Table of contents MySQL result sorting - Aggregat...

PyTorch development environment installation tutorial under Windows

Anaconda Installation Anaconda is a software pack...

How to implement html input drop-down menu

Copy code The code is as follows: <html> &l...

mysql 8.0.18 mgr installation and its switching function

1. System installation package yum -y install mak...