Page 1 of 1

xammp mysql change port to 3307

PostPosted: 25. June 2015 04:20
by killuaZ
hi everyone:
i have a problem running the MySql in xampp. i have change the port of the apache to listen to 82 and it worked fine.

i have a stand alone MySql which is running in my local machine for my web application. and it uses the port 3306.

Now, i need to change the port of the xampp mysql to 3307.
i did these steps: change the two instances of 3306 to 3307 in my.ini.
Code: Select all
# The following options will be passed to all MySQL clients
[client]
#password       = "your_password"
port            = 3307
socket          = "C:/xampp/mysql/mysql.sock"

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port= 3307


after this, still it wont run.

please help me guys...thank you in advance...
Image

Re: xammp mysql change port to 3307

PostPosted: 25. June 2015 14:25
by mark.mcdonald
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 3307 from 3306 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.
Cheers !

Re: xammp mysql change port to 3307

PostPosted: 25. June 2015 15:14
by Altrea
Hi,

killuaZ wrote:it wont run.

That is a very poor error description.

Please post the full contents of your control panel log window as well as your mysql error.log so that we can see what really happens.

best wishes,
Altrea

Re: xammp mysql change port to 3307

PostPosted: 26. June 2015 02:50
by killuaZ
10:48:18 AM [Apache] Attempting to start Apache app...
10:48:18 AM [Apache] Status change detected: running
10:48:22 AM [mysql] Problem detected!
10:48:22 AM [mysql] Port 3306 in use by ""C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin\mysqld-nt" --defaults-file="C:\Program Files (x86)\MySQL\MySQL Server 5.0\my.ini" MySQL"!
10:48:22 AM [mysql] MySQL WILL NOT start without the configured ports free!
10:48:22 AM [mysql] You need to uninstall/disable/reconfigure the blocking application
10:48:22 AM [mysql] or reconfigure MySQL and the Control Panel to listen on a different port
10:48:22 AM [mysql] Attempting to start MySQL service...

this is the error log from the control panel...
i also changed already the 3306 to 3307 from php.ini.

why is it still pointing to 3306?

Re: xammp mysql change port to 3307

PostPosted: 26. June 2015 03:50
by Altrea
killuaZ wrote:10:48:22 AM [mysql] Attempting to start MySQL service...

because the XAMPP control panel found a mysql service with the same name it expects his own mysql service.
change the mysql service name in your control panel config.

killuaZ wrote:i also changed already the 3306 to 3307 from php.ini.

you meant MySQLs my.ini, not php.ini i hope.

Re: xammp mysql change port to 3307

PostPosted: 26. June 2015 04:19
by killuaZ
thank you for the quick reply mam altrea.

can you point me where to change the mysql service name for xampp?

Re: xammp mysql change port to 3307

PostPosted: 26. June 2015 13:19
by Altrea
straight forward:
Config > Service and Port settings > MySQL > "Service Name"
And you should tell the control panel the new MySQL port too at the same place