在你的my.ini(Windows)或my.cfg(Linux) 中就有啊。或者如果已经连入MySQL可以直接 mysql> show variables like 'port'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | port | 3306 | +---------------+-------+ 1 row in set (0.00 sec)mysql>3306 是默认端口。
mysql> show variables like 'port'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | port | 3306 | +---------------+-------+ 1 row in set (0.44 sec)mysql>或者使用配置助手查看
mysql> show variables like 'port'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | port | 3306 | +---------------+-------+ 1 row in set (0.00 sec)
mysql> show variables like 'port';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port | 3306 |
+---------------+-------+
1 row in set (0.00 sec)mysql>3306 是默认端口。
mysql> show variables like 'port';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port | 3306 |
+---------------+-------+
1 row in set (0.44 sec)mysql>或者使用配置助手查看
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta content="请问如何查看mysql 端口号 其他数据库开发 MySQL/Postgresql" name="Keywords"/>
<meta content="请问如何查看mysql 端口号" name="description"/>
<title>请问如何查看mysql 的端口号? - 其他数据库开发 / MySQL/Postgresql</title>
<link href="http://c.csdn.net/bbs/t/5/t5.css" rel="stylesheet" type="text/css" />
<link href="http://www.csdn.net/images/favicon.ico" rel="SHORTCUT ICON" />
<script type="text/javascript">
var tinfo = {
pdate: "2009-05-21 20:57:54"
,sid: "ba09fe7e-2fb7-42d3-805e-578a4a8485e1"
,tid: "28692aac-379b-4046-a0e2-a6be0ad308f4"
,ba: "OtherDatabase"
,sa: "MySQLPostgresql"
};
</script>
<script type="text/javascript" src="/u/t5/t5.js"></script>
<script type="text/javascript" src="http://counter.csdn.net/a/js/AreaCounter.js"></script>
</head>
<body id="bbscsdn_wrap"><div class="tad">
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port | 3306 |
+---------------+-------+
1 row in set (0.00 sec)