0. my.ini MySQL 的初始化配置信息

mysql 启动时会读取该配置文件,如果按照默认方式安装 mysql 的话,该配置文件在:

C:\ProgramData\MySQL\MySQL Server 5.7\my.ini

1. MySQL 版本查询

首先登陆 MySQL 命令行:

mysql> SELECT version();
+------------+
| version()  |
+------------+
| 5.7.19-log |
+------------+
1 row in set (0.00 sec)

2. 端口号及其他(3306 是默认端口号)

首先进入 MySQL 命令行,如下方法均可查看:

  • 方法 1,使用全局变量:

    mysql> SHOW global variables like 'port';
    +---------------+-------+
    | Variable_name | Value |
    +---------------+-------+
    | port          | 3306  |
    +---------------+-------+
    1 row in set, 1 warning (0.00 sec)
  • 方法 2,使用 status,获得系统全面信息

    
    mysql> status;
    --------------
    
    mysql  Ver 14.14 Distrib 5.7.19, for Win64 (x86_64)
    
    Connection id:          9
    Current database:
    Current user:           root@localhost
    SSL:                    Not in use
    Using delimiter:        ;
    Server version:         5.7.19-log MySQL Community Server (GPL)
    Protocol version:       10
    Connection:             localhost via TCP/IP
    Server characterset:    utf8
    Db     characterset:    utf8
    Client characterset:    gbk
    Conn.  characterset:    gbk
    TCP port:               3306
    Uptime:                 1 hour 54 sec
    
    
    Threads: 1  Questions: 19  Slow queries: 0  Opens: 109  Flush tables: 1  Open tables: 102  Queries per second avg: 0.005
    --------------
    

references

posted on 2017-08-27 10:49  未雨愁眸  阅读(375)  评论(0编辑  收藏  举报