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

Element-ui's built-in two remote search (fuzzy query) usage explanation

Problem Description There is a type of query call...

Tutorial on installing GreasyFork js script on mobile phone

Table of contents Preface 1. Iceraven Browser (Fi...

Nginx uses reverse proxy to implement load balancing process analysis

Introduction Based on docker container and docker...

How to quickly build ELK based on Docker

[Abstract] This article quickly builds a complete...

How to dynamically modify container port mapping in Docker

Preface: Docker port mapping is often done by map...

Analyze the compilation and burning of Linux kernel and device tree

Table of contents 1. Prepare materials 2. Downloa...

Analysis of the reasons why MySQL field definitions should not use null

Why is NULL so often used? (1) Java's null Nu...

Detailed Example of MySQL InnoDB Locking Mechanism

1. InnoDB locking mechanism The InnoDB storage en...

About the problem of running git programs in jenkins deployed by docker

1. First, an error message is reported when assoc...

How to deploy Vue project under nginx

Today I will use the server nginx, and I also nee...

Detailed discussion of the differences between loops in JavaScript

Table of contents Preface Enumerable properties I...

Summary of 4 methods of div+css layout to achieve 2-end alignment of css

The div+css layout to achieve 2-end alignment is ...

Ubuntu installation graphics driver and cuda tutorial

Table of contents 1. Uninstall the original drive...

How to run postgreSQL with docker

1. Install Docker. Reference URL: Docker Getting ...