Home > Database > Mysql Tutorial > body text

How to query encoding in mysql

青灯夜游
Release: 2021-12-13 18:19:50
Original
6874 people have browsed it

Query method: 1. Use the "show variables like 'character%'" command to query the encoding of the entire library; 2. Use the "show table status from table name like "%yxfx_zxxx_fyb%"" command to query Query the specified table code.

How to query encoding in mysql

The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.

mysql query encoding

Method 1: Query the encoding of the entire library

show variables like 'character%'
Copy after login

How to query encoding in mysql

Among them,

  • character_set_client is the client encoding method;

  • ##character_set_connection is the encoding used to establish the connection;

  • character_set_database database encoding;

  • character_set_results result set encoding;

  • character_set_server database server encoding ;

As long as the above four encoding methods are the same, there will be no garbled code problem.

Method 2: Query the encoding of the specified table

Use the following command:

show table status from 表名 like "%yxfx_zxxx_fyb%"
Copy after login
[Related recommendations:

mysql video tutorial

The above is the detailed content of How to query encoding in mysql. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!