Docker MySql 查看版本的三种方法
1、mysql -V命令查看版本
# 执行命令
docker exec -it mysql8 mysql -V
* 响应结果
mysql Ver 8.0.27 for Linux on aarch64 (MySQL Community Server - GPL)
2、status命令查看版本
# 登录容器,执行命令:status;
docker exec -it mysql8 mysql -uroot -proot123456
* 响应结果
mysql> status;
--------------
mysql Ver 8.0.27 for Linux on aarch64 (MySQL Community Server - GPL)
Connection id: 90
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 8.0.27 MySQL Community Server - GPL
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8mb4
Db characterset: utf8mb4
Client characterset: latin1
Conn. characterset: latin1
UNIX socket: /var/lib/mysql/mysql.sock
Binary data as: Hexadecimal
Uptime: 38 min 53 sec
Threads: 2 Questions: 170 Slow queries: 0 Opens: 117 Flush tables: 3 Open tables: 36 Queries per second avg: 0.072
--------------
3、version命令查看版本
# 登录容器,执行命令:select version();
docker exec -it mysql8 mysql -uroot -proot123456
* 响应结果
mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.27 |
+-----------+
1 row in set (0.00 sec)
所有文章均为本人原创,本人写作的目的就是想帮助对技术有需要的人,所以欢迎同行转载本站文章,但是希望您注明来源,并留下原文链接地址,这是对文章作者的尊重,也是对知识的尊重。
留言评论