1.使用Mysql -V
[root@ucjmh ~]# mysql -V
mysql Ver 14.14 Distrib 5.5.41, for Linux (i686) using readline 5.1
2.在mysql中输入命令-->status
mysql> status
--------------
mysql Ver 14.14 Distrib 5.5.41, for Linux (i686) using readline 5.1
Connection id: 25
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.5.41 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: /var/lib/mysql/mysql.sock
Uptime: 3 hours 4 min 36 sec
Threads: 2 Questions: 161 Slow queries: 0 Opens: 78 Flush tables: 3 Open tables: 24 Queries per second avg: 0.014
3.在help中找到
[root@ucjmh ~]# mysql --help | grep Distrib
mysql Ver 14.14 Distrib 5.5.41, for Linux (i686) using readline 5.1
4.使用version()函数
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.5.41 |
+-----------+
1 row in set (0.00 sec)