See methods for three MySQL character sets (go)

Source: Internet
Author: User

Http://database.51cto.com/art/201010/229171.htm

*****************************************

There are a variety of MySQL character sets, the following is a list of three of the most common MySQL character set viewing methods, this method for your reference, I hope you learn MySQL database can be enlightened.

One, view MySQL database server and database MySQL character set.

  1. MySQL> Show variables like '%char% ';
  2. +--------------------------+-------------------------------------+------
  3. | variable_name | Value |
  4. +--------------------------+-------------------------------------+------
  5. | character_set_client | UTF8 |--Client Character Set
  6. | character_set_connection | UTF8 |
  7. | Character_set_database | UTF8 |--database Character Set
  8. | Character_set_filesystem | binary |
  9. | Character_set_results | UTF8 |
  10. | Character_set_server | UTF8 |--server Character Set
  11. | Character_set_system | UTF8 |
  12. | Character_sets_dir | D:\MySQL Server 5.0\share\charsets\ |
  13. +--------------------------+-------------------------------------+------

Second, look at the MySQL data Table (table) of the MySQL character set.

    1. MySQL> Show table status from sqlstudy_db like '%countries% ';
    2. +-----------+--------+---------+------------+------+-----------------+------
    3. | Name | Engine | Version | Row_format | Rows | Collation |
    4. +-----------+--------+---------+------------+------+-----------------+------
    5. | Countries |      InnoDB | 10 |   Compact | 11 | Utf8_general_ci |
    6. +-----------+--------+---------+------------+------+-----------------+------

Check the MySQL character set for MySQL data column (column).

  1. MySQL> Show full columns from countries;
  2. +----------------------+-------------+-----------------+--------
  3. | Field | Type | Collation | .......
  4. +----------------------+-------------+-----------------+--------
  5. | countries_id | Int (11) | NULL | .......
  6. | Countries_name | VARCHAR (64) | Utf8_general_ci | .......
  7. | countries_iso_code_2 | char (2) | Utf8_general_ci | .......
  8. | Countries_iso_code_3 | CHAR (3) | Utf8_general_ci | .......
  9. | address_format_id | Int (11) | NULL | .......
  10. +----------------------+-------------+-----------------+--------

See methods for three MySQL character sets (go)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.