xammp mysql change port to 3307

Problems with the Windows version of XAMPP, questions, comments, and anything related.

xammp mysql change port to 3307

Postby killuaZ » 25. June 2015 04:20

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
Last edited by killuaZ on 26. June 2015 02:47, edited 1 time in total.
killuaZ
 
Posts: 3
Joined: 25. June 2015 03:56
Operating System: windows 8

Re: xammp mysql change port to 3307

Postby mark.mcdonald » 25. June 2015 14:25

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 !
mark.mcdonald
 
Posts: 160
Joined: 13. March 2015 15:48
Location: Edmonton
Operating System: Windows Server 2012 R2

Re: xammp mysql change port to 3307

Postby Altrea » 25. June 2015 15:14

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
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: xammp mysql change port to 3307

Postby killuaZ » 26. June 2015 02:50

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?
killuaZ
 
Posts: 3
Joined: 25. June 2015 03:56
Operating System: windows 8

Re: xammp mysql change port to 3307

Postby Altrea » 26. June 2015 03:50

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.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: xammp mysql change port to 3307

Postby killuaZ » 26. June 2015 04:19

thank you for the quick reply mam altrea.

can you point me where to change the mysql service name for xampp?
killuaZ
 
Posts: 3
Joined: 25. June 2015 03:56
Operating System: windows 8

Re: xammp mysql change port to 3307

Postby Altrea » 26. June 2015 13:19

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
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 130 guests