mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.15 |
+-----------+
1 row in set (0.00 sec)
方法二:
mysql> status
--------------
mysql Ver 8.0.15 for linux-glibc2.12 on x86_64 (MySQL Community Server - GPL)
Connection id: 613
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 8.0.15 MySQL Community Server - GPL
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8mb4
Db characterset: utf8mb4
Client characterset: utf8mb4
Conn. characterset: utf8mb4
UNIX socket: /tmp/mysql.sock
Uptime: 5 days 8 hours 37 min 21 sec
Threads: 37 Questions: 6324 Slow queries: 15 Opens: 757 Flush tables: 3 Open tables: 411 Queries per second avg: