[shengting@login ~]$ mysql -V
mysql Ver 14.14 Distrib 5.5.46, for debian-linux-gnu (x86_64)
2:在mysql中:mysql> status;
以下是代码片段:
mysql> status;
--------------
mysql Ver 14.14 Distrib 5.5.46, for debian-linux-gnu (x86_64) using readline 6.3
Connection id: 4393
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.5.46-0ubuntu0.14.04.2 (Ubuntu)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/run/mysqld/mysqld.sock
Uptime: 3 days 22 hours 58 min 49 sec
Threads: 1 Questions: 141473 Slow queries: 0 Opens: 81 Flush tables: 1 Open tables: 74 Queries per second avg: 0.413
3:在help里面查找
以下是代码片段:
[shengting@login ~]$ mysql --help | grep Distrib
mysql Ver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i686)
4:使用mysql的函数
以下是代码片段:
mysql> select version();
+-------------+
| version() |
+-------------+
| 3.23.56-log |
+-------------+
1 row in set (0.00 sec)