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
cellspacing is the distance between cells in the t...
This article describes the import and export oper...
Table of contents Pull a centos image Generate ng...
Most navigation bars are arranged horizontally as...
1. parseFloat() function Make a simple calculator...
Problem Reproduction When using HTML for editing,...
Preface I had previously enabled Docker's 237...
This article mainly introduces how to add floatin...
In the hive installation directory, enter the con...
Recently, the client of a project insisted on hav...
HTML implements 2-column layout, with fixed width...
Prerequisites Need to install git Installation St...
This article example shares the specific code of ...
Beginners can learn HTML by understanding some HT...
Preface In daily development, we often encounter ...