首頁 >資料庫 >mysql教程 >mysql使用status命令测试/判断数据库是否连接

mysql使用status命令测试/判断数据库是否连接

WBOY
WBOY原創
2016-06-01 09:56:471428瀏覽

眼熟如下所示:

<code class="language-sql">mysql>
mysql>
mysql> STATUS;
--------------
mysql  Ver 14.12 Distrib 5.0.41, for Win32 (ia32)

Connection id:          55
Current database:       test
Current user:           root@localhost
SSL:                    Not in use
Using delimiter:        ;
Server version:         5.0.41-community-nt MySQL Community Edition (GPL)
Protocol version:       10
Connection:             localhost via TCP/IP
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
TCP port:               3306
Uptime:                 10 days 23 hours 17 min 22 sec

Threads: 1  Questions: 34588  Slow queries: 0  Opens: 4294  Flush tables: 1  Open tables: 18  Queries per second avg: 0.036
--------------

mysql></code>

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn