码迷,mamicode.com
首页 > 数据库 > 详细

mysql 查看mysql相关信息

时间:2018-09-06 18:22:15      阅读:231      评论:0      收藏:0      [点我收藏+]

标签:utf8   nec   har   lin   mmu   protocol   rac   unit   current   

登入数据库的时候:

select @@version;

select version();

复制代码
mysql> select @@version;
+-----------+
| @@version |
+-----------+
| 5.5.53    |
+-----------+
1 row in set (0.00 sec)

mysql> select version();
+-----------+
| version() |
+-----------+
| 5.5.53    |
+-----------+
1 row in set (0.00 sec)
复制代码
status;

复制代码
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

D:\MySQL\bin>mysql -V
mysql  Ver 14.14 Distrib 5.5.53, for Win32 (AMD64)

D:\MySQL\bin>mysql --version
mysql  Ver 14.14 Distrib 5.5.53, for Win32 (AMD64)
mysql --help | findstr Distrib    //windows终端

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

D:\phpStudy\MySQL\bin>mysql --help | findstr Distrib
mysql  Ver 14.14 Distrib 5.5.53, for Win32 (AMD64)
 

 

mysql 查看mysql相关信息

标签:utf8   nec   har   lin   mmu   protocol   rac   unit   current   

原文地址:https://www.cnblogs.com/yanxiatingyu/p/9599283.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!