This question is a duplicate. The previous question on StackOverflow is: https://stackoverflow.com/questions/25471631/xampp-mysql-wont-start-even-after-changing-ports and it hasn't been answered (poor OP) - which is why I am asking again now.
When I first turned on XAMPP, mySql56 was using port 80. This conflicted with Apache's default settings which were set to use 80 and 443. I disabled mySql56 and also didn't allow it to start automatically. Now, Apache works when I click "Start" on XAMPP.
Now I want to turn on MySQL. When I click on MySQL "Start", the console shows "Problem detected! Port 3306 in use by "C:/Program Files/MySQL/MySQL Server 5.6/bin\mysqld" --defaults-file="C:/ProgramData\MySQL\MySQL Server 5.6\my.ini" MySQL56"! MySQL WILL NOT start without the configured ports free..."
Indeed, when I open the mysql_error log, around about line 20, it does say "Do you already have another mysqld server running on port: 3306?" Turns out, a service called mysqld.exe is using port 3306.
What I first don't understand is how a MySQL service (mysqld.exe) is using 3306 and XAMPP/MySQL is saying someone is using port 3306? In other words, they can't use 3306 because they are using it!
Secondly, I went into the MySQL config file (my.ini) and changed all references to 3306 to 3308. I also changed it in the file called "php.ini" on C/Program Files/xampp/php. Yet when I try to run it again, it is still trying to get onto port 3306 (which again, is being used by itself) despite my changes on the configuration file.
So my objective is to successfully turn on MySQL on XAMPP.