1.在终端下:mysql -V.
[root@localhost bin]# mysql -V;mysql Ver 14.14 Distrib 5.6.21, for Linux (x86_64) using EditLine wrapper[root@localhost bin]# mysql -v;ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
注意,这里是大写字母V~
2.在MySQL中
mysql> status;--------------mysql Ver 14.14 Distrib 5.6.35, for Win64 (x86_64)Connection id: 2Current database:Current user: ODBC@localhostSSL: Not in useUsing delimiter: ;Server version: 5.6.35-log MySQL Community Server (GPL)Protocol version: 10Connection: localhost via TCP/IPServer characterset: latin1Db characterset: latin1Client characterset: gbkConn. characterset: gbkTCP port: 3306Uptime: 3 hours 11 min 13 secThreads: 1 Questions: 7 Slow queries: 0 Opens: 67 Flush tables: 1 Open tables: 60 Queries per second avg: 0.000--------------
3.使用MySQL的函数
mysql> select version();+------------+| version() |+------------+| 5.6.35-log |+------------+1 row in set (4.25 sec)