Home  >  Article  >  Backend Development  >  How to solve mac php garbled problem

How to solve mac php garbled problem

藏色散人
藏色散人Original
2020-07-29 09:12:282423browse

Solution to mac php garbled code: First create a text file named "my.cnf"; then change the content to "utf8[mysql]default-character-set=utf8"; then place the file Under conf; finally restart the mysql server.

How to solve mac php garbled problem

Recommendation: "PHP Tutorial"

The simplest way is:

1. Create a text file named my.cnf

2. Edit the file and change the content to

[mysqld]character-set-server=utf8[mysqldump]default-character-set=utf8[mysql]default-character-set=utf8

3. Place the file in /Applications/MAMP/conf/

4. Restart mysql server

The above is the detailed content of How to solve mac php garbled problem. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn