1. Check the character set of the default installed MySQL mysql> show variables like '%char%'; character_set_database and character_set_server are still latin1 character sets, which means that the tables created by MySQL later are all in latin1 character sets, not utf8, which will cause some trouble. Therefore, it is necessary to modify my.cnf. Be sure to close the MySQL process before modifying my.cnf, otherwise you will encounter the problem that MySQL's sock cannot connect. 2. Close the mysqld background process Control mysqld in the system preferences, avoiding the trouble of finding the installation location of mysqld. Click Stop MySQL Server 3. Modify the mysql configuration file /etc/my.cnf sudo cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf sudo vi /etc/my.cnf [client] section added: default-character-set=utf8 [mysqld] section added: character-set-server=utf8 After the modification is completed, start mysql 4. Check the results: mysql> show variables like '%char%'; Modification completed# You may also be interested in:
|
<<: Summary of Linux operation and maintenance from elementary to advanced knowledge points
>>: JavaScript regular verification password strength implementation method
Why are the scroll bars of the browsers and word ...
Effective solution for Ubuntu in virtual machine ...
Three ways to define functions in JS Let me expla...
Table of contents 1. New II. Modification element...
1. Some problems encountered I remember when we w...
1 Download the MySQL 5.6 version compressed packa...
Background-image is probably one of those CSS pro...
Preface As Linux operation and maintenance engine...
This article example shares the specific code of ...
BackUpMysql.sh script #!/bin/bash PATH=/bin:/sbin...
What are Routing and Routing Table in Linux? The ...
It is difficult to find good image material websi...
The office needs Ubuntu system as the Linux devel...
The installation of Harbor is pretty simple, but ...
I saw an article in Toutiao IT School that CSS pe...