首页 > 数据库 > MySQL > 正文

Mysql之查看数据库版本

2024-07-24 12:36:26
字体:
来源:转载
供稿:网友

原文链接                                  https://www.cnblogs.com/captainRoB/p/7163871.html

登入数据库的时候:

mysql> select @@version;
+-----------+
| @@version |
+-----------+
| 5.5.53    |
+-----------+
row in set (0.00 sec)

mysql> select version();
+-----------+
| version() |
+-----------+
| 5.5.53    |
+-----------+
row in set (0.00 sec)

mysql> status;
--------------
mysql  Ver 14.14 Distrib 5.5.53, for Win32 (AMD64)

Connection id:          11
Current database:       mysql
Current user:           root@localhost
SSL:                    Not in use
Using delimiter:        ;
Server version:         5.5.53 MySQL Community Server (GPL)
Protocol version:       10
Connection:             localhost via TCP/IP
Server characterset:    utf8
Db     characterset:    utf8
Client characterset:    utf8
Conn.  characterset:    utf8
TCP port:               3306
Uptime:                 3 hours 3 min 4 sec

Threads: 3  Questions: 240  Slow queries: 0  Opens: 49  Flush tables: 1  Open tables: 0  Queries per second avg: 0.021
--------------

未登入数据库的时候:

mysql -V

mysql --version

Windows系统D:/MySQL/bin>mysql -Vmysql  Ver 14.14 Distrib 5.5.53, for Win32 (AMD64)D:/MySQL/bin>mysql --versionmysql  Ver 14.14 Distrib 5.5.53, for Win32 (AMD64)
D:/phpStudy/MySQL/bin>mysql --help | findstr Distribmysql  Ver 14.14 Distrib 5.5.53, for Win32 (AMD64)

mysql --help | findstr Distrib    //windows终端

mysql --help | grep Distrib    //linux终端

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表