mysql查看端口

在你的my.ini(Windows)或my.cfg(Linux) 中就有啊。

或者如果已经连入MySQL可以直接 

SQL code
?
1
2
3
4
5
6
7
8
9
mysql> show variables like 'port';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port          | 3306  |
+---------------+-------+
1 row in set (0.00 sec)
 
mysql>
原文地址:https://www.cnblogs.com/bluewelkin/p/3651561.html