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
accomplish This effect is difficult to replicate ...
This is an interview question, which requires the...
Basics The matching order of location is "ma...
Introduction MySQL achieves high availability of ...
MySQL Performance Optimization MySQL performance ...
Preface There is a scenario where, for the sake o...
The nginx configuration file is mainly divided in...
This article records the detailed installation tu...
Docker usage of gitlab gitlab docker Startup Comm...
Table of contents Preface Type Inference Truth va...
Effect: When the slideshow moves in one direction...
This is the content of React 16. It is not the la...
Table of contents 1 Introduction 2 Trigger Introd...
This article example shares the specific code for...
The Swap partition of the Linux system, that is, ...