Home >Database >Mysql Tutorial >查看MySQL数据库字符集及数据库连接情况

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

WBOY
WBOYOriginal
2016-06-07 16:52:241397browse

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

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