Home  >  Article  >  Database  >  About the charset configuration of mysql in django

About the charset configuration of mysql in django

藏色散人
藏色散人forward
2020-05-14 16:08:222159browse

About the charset configuration of mysql in django

1. After searching for a long time, I concluded that there is no way to directly configure the charset of a table in django.

2. All I can find on the Internet is charset that allows people to directly configure the database, which is really speechless. Is it difficult to add a line CHARSET=utf8mb4 at the end when creating a table?

3. There is no configuration item when installing mysql on mac, you can create it yourself.

4. You can use mysql --help | grep "Default options" -A 1 to know the configuration search order of mysql. My local one is /etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf

5 . Just configure it. I configured it by referring to here, including database library encoding, client communication encoding, etc.

Recommended: "mysql tutorial"

The above is the detailed content of About the charset configuration of mysql in django. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete