Solution to the Chinese garbled code problem in the decompressed version of MYSQL

Solution to the Chinese garbled code problem in the decompressed version of MYSQL

The decompressed version of MYSQL is installed

1: After decompression, copy a my.ini file and add the byte encoding configuration:

[client]
default-character-set=gbk
[mysqld]
character-set-server=utf8

Specify the database configuration file bin\mysqld --defaults-file=my.ini --initialize-insecure Specify the configuration file my.ini (If you ignore this step, the configuration of my.ini will not take effect, which is a bit of a pitfall)

Install the database: bin/mysqld --install

Start the database service: net start mysql (under Windows environment)

2: Specify the database encoding when creating a database:

3 Specify UTF8 encoding when creating a table:

CREATE TABLE `Demo_Table` (
 `name` varchar(255) NOT NULL,
 `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
 `modified_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
 `size` bigint(20) DEFAULT NULL,
 `type` varchar(255) DEFAULT NULL,
 `label` varchar(255) DEFAULT NULL,
 PRIMARY KEY (`name`,`created_by`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Solution to the garbled code problem in MySQL 5.x
  • How to solve the problem of Chinese garbled characters when using MySQL to obtain database data
  • Example solution for writing garbled Chinese characters into MySQL in PHP
  • MySQL character set garbled characters and solutions
  • Solution to MySQL garbled code problem under Linux
  • How to deal with garbled characters in Mysql database
  • How to solve the problem of Chinese garbled characters when inserting table data into MySQL
  • Solve the problem of Chinese garbled characters when inserting data into MySQL by Tomcat under Linux
  • Summary of handling JDBC connection mysql garbled code exception problem
  • How to solve the DOS window garbled problem in MySQL

<<:  How to completely uninstall node and npm on mac

>>:  JS implements multiple tab switching carousel

Recommend

Common problems and solutions during MySQL MGR construction

Table of contents 01 Common Faults 1 02 Common Fa...

Mac VMware Fusion CentOS7 configuration static IP tutorial diagram

Table of contents Install CentOS7 Configuring Sta...

MySQL learning notes help document

View system help help contents mysql> help con...

30 free high-quality English ribbon fonts

30 free high-quality English ribbon fonts for down...

Implementation of Nginx configuration of multi-port and multi-domain name access

To deploy multiple sites on a server, you need to...

How to find and delete duplicate rows in MySQL

Table of contents 1. How to find duplicate rows 2...

HTML hyperlinks explained in detail

Hyperlink Hyperlinks are the most frequently used ...

A record of the pitfalls of the WeChat applet component life cycle

The component lifecycle is usually where our busi...

Record the steps of using mqtt server to realize instant communication in vue

MQTT Protocol MQTT (Message Queuing Telemetry Tra...

Solution to slow network request in docker container

Several problems were discovered during the use o...

Detailed explanation of the mechanism and implementation of accept lock in Nginx

Preface nginx uses a multi-process model. When a ...

Linux Network System Introduction

Table of contents Network Information Modify the ...

Detailed tutorial on installing and configuring MySQL 5.7.20 under Centos7

1. Download the MySQL 5.7 installation package fr...

Solve the pitfall of storing boolean type values ​​in localstorage

LocalStorage stores Boolean values Today, when I ...

Detailed explanation of Alibaba Cloud security rule configuration

Two days ago, I took advantage of the Double 11 s...