温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

如何查询mysql的版本号

发布时间:2021-12-07 12:18:57 来源:亿速云 阅读:2592 作者:小新 栏目:MySQL数据库

这篇文章给大家分享的是有关如何查询mysql的版本号的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。

查询方法:1、命令行登录mysql,在输出的信息中获取版本号;2、利用navicat连接mysql,右键选择“详细信息”,在弹窗中查看版本号信息;3、执行“select version();”语句来查询;4、执行“status”语句来查询。

本教程操作环境:linux5.9.8系统、mysql 5.7.17版本、Dell G3电脑。

查看mysql的版本号

1、在命令行登录mysql,即可看到mysql的版本号

[root@heyong ~]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 487032Server version: 5.7.17 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

如何查询mysql的版本号

2、利用navicat连接mysql的客户端工具可以查看

连接之后右键——详细信息

如何查询mysql的版本号

3、利用mysql命令查看

mysql> select version();
+-----------+
| version() |
+-----------+
| 5.7.17    |
+-----------+
1 row in set (0.01 sec)

mysql>

如何查询mysql的版本号4

4、在命令行使用status查看

mysql> status
--------------
mysql  Ver 14.14 Distrib 5.7.17, for linux-glibc2.5 (x86_64) using  EditLine wrapper

Connection id:        488398
Current database:    
Current user:        root@localhost
SSL:            Not in use
Current pager:        stdout
Using outfile:        ''
Using delimiter:    ;
Server version:        5.7.17 MySQL Community Server (GPL)
Protocol version:    10
Connection:        Localhost via UNIX socket
Server characterset:    utf8
Db     characterset:    utf8
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:        /tmp/mysql.sock
Uptime:            5 days 10 hours 5 min 40 sec

Threads: 154  Questions: 15051829  Slow queries: 0  Opens: 37599  Flush tables: 11  Open tables: 1563  Queries per second avg: 32.138
--------------

mysql>

如何查询mysql的版本号

5、使用mysql --help | grep Distrib查看

[root@heyong tools]# mysql --help | grep Distrib 
mysql Ver 14.14 Distrib 5.7.17, for linux-glibc2.5 (x86_64) using EditLine wrapper

如何查询mysql的版本号

感谢各位的阅读!关于“如何查询mysql的版本号”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI