Home  >  Article  >  Database  >  phpmyadmin database garbled code

phpmyadmin database garbled code

藏色散人
藏色散人Original
2019-10-19 09:22:322633browse

phpmyadmin database garbled code

phpmyadmin database garbled?

1. Check the server code in phpMyAdmin

After logging in to phpMyAdmin, you can see the server code on the homepage

Recommended: "mysql tutorial

phpmyadmin database garbled code

#From the picture, we see that the encoding of this MySQL server is UTF-8 Unicode (utf8).

2. Specify the character set when creating the database in phpMyAdmin

When we talked about the priority of the character set earlier, we said that the priority of the database character set is higher than the priority of the server. The process of creating a database and specifying the character set in phpMyAdmin is as follows:

phpmyadmin database garbled code

The name of the database in the figure is Baidusql, and the character set is gbk_chinese_ci, which is gbk.

If you need to modify the character set of the database, you can select the database, then click the "Operation" option, find the option you need in the "Organization" drop-down list, and then click the "Execute" button

phpmyadmin database garbled code

3. Create a table in phpMyAdmin and specify the character set

When creating a table, first fill in the table name and field name, and click the execute button

phpmyadmin database garbled code

In the creation page, the default option for sorting is empty. If not selected, the character set of the database will be inherited by default.

phpmyadmin database garbled code

If you have special needs, you can specify it yourself, otherwise it is recommended to keep the default value.

After entering the data, the Chinese display is normal!

phpmyadmin database garbled code

The above is the detailed content of phpmyadmin database garbled code. 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