问题
When I try to start MySql in XAMPP control panel (v3.2.1) I have the following message and MySql does not start.
23:02:03 [mysql] Problem detected!
23:02:03 [mysql] Port 3306 in use by ""C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.1\my.ini" MySQL"!
23:02:03 [mysql] MySQL WILL NOT start without the configured ports free!
23:02:03 [mysql] You need to uninstall/disable/reconfigure the blocking application
23:02:03 [mysql] or reconfigure MySQL and the Control Panel to listen on a different port
23:02:03 [mysql] Attempting to start MySQL service...
回答1:
The port 3306
is already in use in your machine, so you need to change the port number to 3307
in my.ini
in C:\xampp\mysql\bin\my.ini
.
Once done restart the Apache server.
回答2:
To change the port successfully, you have to change the port number in following files in the mentioned manner.
- You can change the port number to 3306 from 3307 in \xampp\mysql\bin\my.ini file in a couple of places.
- There is also a couple of default MySQL port settings in the \xampp\php\php.ini file that would also need changing.
- Save the files and restart Apache and MySQL to test.
Also make sure you run it as administrator (always helps)
来源:https://stackoverflow.com/questions/32917766/installed-xampp-on-windows-7-32-bit-errors-when-starting