Modify /etc/my.cnf or /etc/mysql/my.cnf file [client] default-character-set = utf8 [mysqld] default-storage-engine = INNODB character-set-server = utf8 collation-server = utf8_general_ci Restart mysql and use the mysql client to check the encoding show variables like '%char%'; Use UTF-8 encoding when creating a new database create database 'test' default character set utf8 collate utf8_general_ci; Create a table and create fields using UTF-8 encoding create table test ( 'id' int(10) unsigned not null auto_increment, 'name' varchar(50) character set utf8 default '', primary key('id') ) 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:
|
<<: CentOS 6-7 yum installation method of PHP (recommended)
>>: Summary of methods to clear cache in Linux system
CSS media query has a very convenient aspect rati...
Physically speaking, an InnoDB table consists of ...
Preface Js is the most commonly used code manipul...
Project requirements require some preprocessing o...
<br />According to foreign media reports, in...
The most popular tag is IE8 Browser vendors are sc...
The specific code is as follows: <a href="...
FTP and SFTP are widely used as file transfer pro...
I was recently working on a project about face co...
Get the current date + time (date + time) functio...
1. Introduction to Macvlan Before the emergence o...
First query table structure (sys_users): SELECT *...
Table of contents 1. Introduction 2. Prepare a pr...
This article introduces blue-green deployment and...
Recently, I encountered a problem in the process ...