Mysql[命令用法] mysqlshow
mysqlshow用法
最近学习mysql时,有用到mysqlshow,并且遇到一些问题,所以做个记录
mysqlshow命令用于显示mysql服务器中数据库、表和列表信息。
语法
mysqlshow(选项)(参数)
命令解析
-h:MySQL服务器的ip地址或主机名;
-u:连接MySQL服务器的用户名;
-p:连接MySQL服务器的密码;
–count:显示每个数据表中数据的行数;
-k:显示数据表的索引;
-t:显示数据表的类型;
-i:显示数据表的额外信息。
参数
数据库信息:指定要显示的数据库信息,可以是一个数据库名,或者是数据库名和表名,或者是数据库名、表名和列名。
Below,it is a example.First, we use the statement.
mysqlshow
You can get the result below.
From the picture,we can learn that if we just use mysqlshow
,the shell can’t compile . Why don’t it work ?
It is because the statement need factors , and we use the new mysqlshow -u root -p
Note: I don’t use the factor ‘-h’, just because my MySQL is installed in my computer. If your MySQL is installed in the other machine, you must use ‘-h’.
OKay , now it is work . Beside databases , the mysqlshow
can seek tables , and the infornation of the table .
By the way , mysqlshow
is used in shell , and not MySQL Command Line Client .
Okay , that is all .
Lucky !