修改mysql端口(Windows免安裝版) 我的MySQL是解壓免安裝版的,要修改MySQL的端口,方法很簡單: 解壓MySQL後,在MySQL根目錄下有一個my-default.ini,打開它,上面的注釋寫的很清楚“# *** DO NOT EDIT THIS FILE.....” 將該文件復制粘貼一份,重命名為:my.ini,還是放在根目錄下 然後,裡面有個 # port = ...... 去掉注釋,並修改為你想要的端口,如 port = 3337 cmd運行mysql mysqld --console 如果看到最後幾行: 2013-04-15 08:12:28 3200 [Note] Server hostname (bind-address): '*'; port: 3337 2013-04-15 08:12:31 3200 [Note] IPv6 is not available. 2013-04-15 08:12:31 3200 [Note] - '0.0.0.0' resolves to '0.0.0.0'; 2013-04-15 08:12:31 3200 [Note] Server socket created on IP: '0.0.0.0'. 2013-04-15 08:12:31 3200 [Note] Event Scheduler: Loaded 0 events 2013-04-15 08:12:31 3200 [Note] mysqld: ready for connections. Version: '5.6.10' socket: '' port: 3337 MySQL Community Server (GPL) 再通過遠程訪問測試一下,就可以證明成功了 關閉解壓版mysql (1)Ctrl + c (2)cmd下輸入: mysqladmin -u root shutdown