Home > Database > Mysql Tutorial > body text

查看MySQL数据库字符集及数据库连接情况

WBOY
Release: 2016-06-07 16:52:24
Original
1367 people have browsed it

1、使用SHOW CHARACTER SET语句列出数据库中可用的字符集:mysqlgt; SHOW CHARACTER SET;2、要想列出一个字符集的校对(Collatio

1、使用SHOW CHARACTER SET语句列出数据库中可用的字符集:

mysql> SHOW CHARACTER SET;

2、要想列出一个字符集的校对(Collation)规则,使用SHOW COLLATION语句。

例如,要想查看latin1(“西欧ISO-8859-1”)字符集的校对规则,使用下面的语句查找那些名字以latin1开头的校对规则:

mysql> SHOW COLLATION LIKE 'latin1%';

3.查看数据表的字符集

mysql> show create table mytable;

这个命令也可以查看建这个表的SQL语句。

4.查看数据库连接情况:

mysql>show processlist;

mysql>show processlist\G;

linux

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