(1)use命令
mysql> use test; # 打开一个已存在的数据库
(2)system命令
执行系统命令
mysql> system clear; # 执行Linux的清屏命令,非常实用的一个命令
(3)quit命令或exit命令
mysql> quit # quit和exit命令都是退出MySQL
Bye
(4)prompt命令
改变MySQL的提示方式
mysql> prompt mysql#
PROMPT set to 'mysql#'
mysql#
(5)status命令
获得当前数据库服务器的状态
mysql> status
mysql>status;
--------------
mysql Ver 14.14 Distrib 5.5.8, for Linux (i686) using EditLine wrapper
Connection id: 28
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.5.8-log Source distribution
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /tmp/mysql.sock
Uptime: 2 hours 57 min 17 sec
Threads: 1 Questions: 104 Slow queries: 0 Opens: 35 Flush tables: 1 Open tables: 27 Queries per second avg: 0.9
--------------
mysql>
声明: 此文观点不代表本站立场;转载须要保留原文链接;版权疑问请联系我们。