您好,登录后才能下订单哦!
下面一起来了解下MySQL版本查看方法,相信大家看完肯定会受益匪浅,文字在精不在多,希望MySQL版本查看方法这篇短内容是你想要的。
1. 没有连接到MySQL云服务器,就想查看MySQL的版本。打开cmd,切换至mysql的bin目录,运行下面的命令即可:
e:\mysql\bin>mysql -V
mysql Ver 14.14 Distrib 5.6.32, for Win32 (AMD64)
(版本为 5.6.32)
或者:
e:\mysql\bin>mysql -v
这个命令可以查看到更为详细的信息,因为它会用账号 ODBC,连接上MySQL云服务器,默认连接到localhost上的3306端口。
或者:
e:\mysql\bin>mysql --help | find "Distrib"
mysql Ver 14.14 Distrib 5.6.32, for Win32 (AMD64)
这种方式只有windows系统下才可用,因为windows中才用find命令查找字符串,且后面的字符串必须用双引号包裹起来,而linux系统下虽然也是用 | 作为管道符,却是使用grep命令查找字符串(如:mysql --help | grep Distrib)。
2. 如果已经连接到了MySQL云服务器,则运行下面的命令:
mysql> select version();
+------------+
| version() |
+------------+
| 5.6.32-log |
+------------+
1 row in set (0.00 sec)
或者:
mysql> status;
--------------
mysql Ver 14.14 Distrib 5.6.32, for Win32 (AMD64)
Connection id: 9
Current database:
Current user: root@localhost
SSL: Not in use
Using delimiter: ;
Server version: 5.6.32-log MySQL Community Server (GPL)
Protocol version: 10
Connection: localhost via TCP/IP
Server characterset: latin1
Db characterset: latin1
Client characterset: gbk
Conn. characterset: gbk
TCP port: 3307
Uptime: 4 hours 7 min 11 sec
Threads: 4 Questions: 126 Slow queries: 0 Opens: 73 Flush tables: 1 Open tables: 66 Queries per second avg: 0.008
或者:
mysql> \s
--------------
mysql Ver 14.14 Distrib 5.6.32, for Win32 (AMD64)
Connection id: 9
Current database:
Current user: root@localhost
SSL: Not in use
Using delimiter: ;
Server version: 5.6.32-log MySQL Community Server (GPL)
Protocol version: 10
Connection: localhost via TCP/IP
Server characterset: latin1
Db characterset: latin1
Client characterset: gbk
Conn. characterset: gbk
TCP port: 3307
Uptime: 4 hours 9 min 29 sec
Threads: 4 Questions: 144 Slow queries: 0 Opens: 73 Flush tables: 1 Open tables: 66 Queries per second avg: 0.009
3. 在命令行连接上MySQL云服务器时,其实就已经显示了MySQL的版本,如:
e:\mysql\bin>mysql -uroot -p -P3307
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.6.32-log 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版本查看方法这篇文章后,很多读者朋友肯定会想要了解更多的相关内容,如需获取更多的行业信息,可以关注我们的行业资讯栏目。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。