旗下导航:搜·么
当前位置:网站首页 > MySQL教程 > 正文

怎样检察MySQL的版本?【MySQL教程】,MySQL,版本,查看

作者:搜教程发布时间:2019-12-01分类:MySQL教程浏览:55评论:0


导读:检察MySQL的版本,主要有以下几个要领,人人感兴趣的无妨尝尝检察MySQL的版本,主要有以下几个要领:1.没有衔接到MySQL服务器,就想检察MySQL的版本。翻开...
检察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当前版本的几种要领,愿望会对人人有协助。

相干文章:

如安在一台windows主机上完成MySQL的主从复制?

Mysql建立外键束缚的两种体式格局

MySQL字符串截取 和 截取字符举行查询

以上就是怎样检察MySQL的版本?的细致内容,更多请关注ki4网别的相干文章!

标签:MySQL版本查看


欢迎 发表评论: