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
The following three methods are commonly used to d...
Compared with vue2, vue3 has an additional concep...
Table of contents Portainer manages multiple Dock...
Suddenly when I logged into MySQL, it said that a...
Table of contents Preface Is the interviewer aski...
Use Docker to build a flexible online PHP environ...
Table of contents 1. Insert the queried results 2...
When I surf the Net, I often see web sites filled...
I've seen people asking before, how to add sty...
Concept of SFTP sftp is the abbreviation of Secur...
First of all, what is 404 and soft 404? 404: Simpl...
Delete the previously installed mariadb 1. Use rp...
What is JDK? Well, if you don't know this que...
The application scenario is: the iframe page has n...
Table of contents Scene Introduction Plugin Imple...