如果已经进入到Mysql环境,办法有两个:
法一:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
mysql> status;
--------------
mysql Ver 14.14 Distrib 5.5.24, for osx10.6 (i386) using readline 5.1
Connection id: 471
Current database: test
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.5.24 MySQL Community Server (GPL)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /tmp/mysql.sock
Uptime: 6 days 15 min 32 sec
Threads: 2 Questions: 4008 Slow queries: 0 Opens: 189 Flush tables: 1 Open tables: 154 Queries per second avg: 0.007
--------------
|
法二:
1
2
3
4
5
6
7
|
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.5.24 |
+-----------+
1 row in set (0.06 sec)
|
如果还未进入工作环境,可以如下:
法一:
1
2
|
localhost-6:~ root$ mysql -V
mysql Ver 14.14 Distrib 5.5.24, for osx10.6 (i386) using readline 5.1
|
法二:
1
2
3
|
localhost-6:~ root$ mysql --help
mysql Ver 14.14 Distrib 5.5.24, for osx10.6 (i386) using readline 5.1
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
本文转自 ustb80 51CTO博客,原文链接:http://blog.51cto.com/ustb80/1297649,如需转载请自行联系原作者