View the default encoding of the MySQL database _ MySQL

Source: Internet
Author: User
View the default MySQL database code bitsCN.com

View the default encoding of the MySQL database

1. use the status command to display the relational information of the database, for example:

mysql> status;————–mysql Ver 14.12 Distrib 5.0.77, for Win32 (ia32)Connection id:          1072Current database:Current user:           test@119.119.247.6SSL:                    Not in useUsing delimiter:        ;Server version:         5.0.67-log MySQL Community Server (GPL)Protocol version:       10Connection:             www.chinajvm.com via TCP/IPServer characterset:    gbkDb     characterset:    gbkClient characterset:    latin1Conn. characterset:    latin1TCP port:               3306Uptime:                 15 days 2 hours 21 min 37 sec

2. you can also use the following command:

mysql> show variables like’char%’;+————————–+——————————————–+| Variable_name            | Value                                      |+————————–+——————————————–+| character_set_client     | latin1                                     || character_set_connection | latin1                                     || character_set_database | gbk                                        || character_set_filesystem | binary                                     || character_set_results    | latin1                                     || character_set_server     | gbk                                        || character_set_system     | utf8                                       || character_sets_dir       | /mysql/mastermysql50/share/mysql/charsets/ |+————————–+——————————————–+8 rows in set (0.03 sec)


BitsCN.com

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.