Conflicting ports of mySQL and XAMPP

拟墨画扇 提交于 2019-12-03 08:18:30

To Resolve MySQL Port and Service conflict when already another MySQL Server is running, you need to follow following steps:-

1) Close XAMPP Server

2) Open file C:\xampp\mysql\bin\my.ini (C: is the default XAMPP Installation)

3) Replace the port number 3306 with 3307

# password = your_password

port = 3307

socket = "C:/xampp/mysql/mysql.sock"

and

# The MySQL server

[mysqld]

port= 3307

4) Save the file and open XAMPP Control Panel

5) In XAMPP Control Panel Click on Config > Service and Port Settings

6) Goto MySQL Tab

7) Change Service name mysql to mysqlxampp and Main port 3306 to 3307

8) Click on Save then Save and close XAMPP

9) Run Again XAMPP and you will be able to start the MySQL Server

You might also face issue with phpMyAdmin For which you can add line

$cfg['Servers'][$i]['port'] = '3307';

in your config.inc.php file in phpMyAdmin root directory.


If you have installed MySQL separately and also have XAMPP's MySQL running, then you will have this issue. The conflict is for port 3306 and not for port 80. I suggest you follow the guidelines mentioned here:

http://silentlyrun.blogspot.com.au/2013/02/how-to-change-apache-n-mysql-port-for.html

This worked for me when I had MySQL installed separately and also as a part of XAMPP.

Restart your machine then use command line netstat. It will show you what application have ports open.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!