Can't start MySQL, port 3306 busy (ok)
https://stackoverflow.com/questions/6136389/cant-start-mysql-port-3306-busy#:~:text=Press%20Ctrl%20%2B%20F%20and%20write,%2C%20namely%20%22%20End%20Task%20%22.
Last updated
https://stackoverflow.com/questions/6136389/cant-start-mysql-port-3306-busy#:~:text=Press%20Ctrl%20%2B%20F%20and%20write,%2C%20namely%20%22%20End%20Task%20%22.
Last updated
102
I'm trying to start MySQL from XAMPP (under Windows Vista), but it's saying that's port 3306 is busy.
What would be the best way with check what application is using that port and how to free it?mysqlwindowsxamppShareFollowedited Sep 18 '20 at 12:53Dharman21.6k1818 gold badges5757 silver badges107107 bronze badgesasked May 26 '11 at 9:27Roger6,1471919 gold badges5555 silver badges8686 bronze badges
Surely you must mean WAMP? XAMPP is for linuX. – gnur May 26 '11 at 10:04
no, I'm using XAMPP, runs fine on Vista. Do you think I should switch to WAMP? – Roger May 26 '11 at 10:10
my bad, I thought the first letter of the *ampp*
series defined to OS, but apparently I was wrong :). – gnur May 26 '11 at 10:12
lol, removed xampp, installed wamp... seems working now! – Roger May 26 '11 at 11:50
In a command shell, run:
or
The first command will output a list that you will need to look through for the line that displays localhost:3306
in the second column. Below this is the application's name using the port.
The secondary command will find find the exact port you are looking for and looks something like this:
3outputs a long list, but non of it has localhost or 3306 in it... :/ – Roger May 26 '11 at 9:45
It's possible that instead of localhost
it prints your machine's name. However, a line with :3306
should appear somewhere. – Linus Kleen May 26 '11 at 9:55
Add a commentReport this ad12
I had the same problem and was stuck on this thing for a day and I couldn't find a perfect answer anywhere. So I gave it a shot on my own and it worked. This solution is for Windows users. I use Windows 7.
My xampp control panel was displaying an error that port 3306 is busy and in use by some file (name was specified).. say "filename.de".
Now follow the following steps:
press Ctrl+Alt+Del and open Task Manager.
Open the "Processes" list and Check for "show all processes" under the list of processes. If you don't see any such option, don't worry! as sometimes administrator permission is required to show some processes.
Now, when you click on "show all processes" button, all the process will be displayed.
Now, switch to "services" tab in the task manager, and a list of services will be displayed. Now look for a service named "filename.de" <-- filename that was diplayed in the error message in xampp.
When you find that service, 'right-click', and then click in option.. GoTo Process.
You will be redirected to the "Processes" tab with focus on a process corresponding to that service. 'Right-Click' and then click on "end process tree".
Now, the issue has been solved! But might have to do the same thing again when you restart your PC. So it is best to keep your PC in sleep-mode.
Otherwise, to solve this issue permanently, open "msconfig" and uncheck that particular process from the services list and click on apply. and you can restart your system.
As Mentioned By @Segun Emmanuel Run the Following Command:
You will get a list of Applications that are using different PORTS. Press Ctrl + F
and write 3306 to find out which Application is using PORT 3306.
After this, Go to Task Manager via Search Bar or by pressing CTRL + ALT + DEL
. Then Under the Background Processes, find out mysqld.exe
, right-click on it and you will find an option to close it, namely "End Task
".
Then go to your Xampp Control Panel and start the MySQL service.
1This worked like a charm! thanks a lot. I was trying to install the MySQL DB via the MySQL installer & encountered this issue on windows 10. I had to open the CMD in admin mode & execute the given command, found the culprit who was still dwelling on 3306 & killed him as you suggested. The MySQL MSI installer was blocked due to the 3306 port already in use issue. It got resolved as soon as I killed the mysqld.exe process from the 'Services' tab list. Yas! +1 Thanks. – Aniket Mar 24 at 15:14
If mysql is not starting in xampp, it might be a port conflict issue. Mysql run by default on port 3306. you need to check if another application is occupying that port. use following command to check app occupying a port
In my case it was javaw.exe which was starting on port 3306. This exe does not cause problem if I am logged in using single user in my Windows 10. But if I have multiple logins, it starts this exe for each user and blocks MySQL to start on 3306 port.
So, I went to task manager. There were no process called so. The I went to services and disabled these two:
I had this problem (slight variation as I was using MAMP)
I found this problem was due to having MySQL Workbench installed, MySQL Workbench started the mySQL service on bootup which in turn stopped MAMP being able to use the port.
To fix this I had 2 options,
Uninstall MySQL Workbench
Open Task, click services tab, kill the current MySQL service
I've been having trouble for hours on this error. I was trying to run MySQL from XAMPP after quite some time. It gave errors, similar to yours, it said that port 3306 is in use. If you:
are running on Windows 10
are avoiding to change the port number of MySQL from 3306
can't see any program using the 3306 port from netstat
reinstalling and deleting everything yet it still give the same error
are enabling and using Hyper-V
all of the other solutions didn't work
This is the solution that worked for me:
Go to the most right of the taskbar and right-click the connection icon, click Open Network & Internet settings
Click Change adapter options
Right-click and Disable everything that relates to Hyper-V
For this problem, a simpler way on Windows is:-
Go to Task Manager
Go to Services
There will be a services named MySQl80 right click on it and then select "Stop"
Try and start the MySQl module on XAMPP server again
If you where not able to find any application or process listening on port 3306
, you might need to check your network adapters.
Disable adapters you do not use.
Pay also attention to the Hyper-V generated network adapter, disable it if you don't need it. Sometimes it can reserve some ports and commands like netstat
will not be able to find it out
ShareFollowedited Jan 17 '19 at 6:24JaysQubeXon5,32733 gold badges1111 silver badges1515 bronze badgesanswered May 26 '11 at 9:33Linus Kleen31.2k1111 gold badges8484 silver badges9696 bronze badges
Just Open task manager and Kill MySql service.ShareFollowanswered Nov 25 '14 at 14:36asas12111 silver badge22 bronze badgesAdd a comment5
ShareFollowedited Aug 18 '13 at 19:42Nev1,4022020 silver badges1818 bronze badgesanswered Aug 18 '13 at 19:09Prabhat5111 silver badge55 bronze badgesAdd a comment5
ShareFollowedited Mar 28 '20 at 12:47answered Mar 28 '20 at 6:19Kashif Iftikhar99077 silver badges2323 bronze badges
if you find an application occupying that port, stop the application and restart xampp. As an alternative, you can go to php.ini file or click configure in the xampp for mysql and change the mysql port to 3307ShareFollowanswered Mar 9 '19 at 12:35ABODE61011 gold badge1111 silver badges1111 bronze badgesAdd a comment2
Going to task manager and killing this exe for the other user fixed the issue and MySQl could start.ShareFollowanswered Aug 18 '17 at 11:29Mihir Kagrana33122 silver badges44 bronze badgesAdd a comment2
Now everything works fine.ShareFollowedited Apr 14 '20 at 14:12Azametzin4,3321212 gold badges2222 silver badges3737 bronze badgesanswered Apr 14 '20 at 13:20naglis mockevicius2122 bronze badgesAdd a comment1
This then allowed MAMP to use port 3306ShareFollowedited Sep 18 '20 at 12:52Dharman21.6k1818 gold badges5757 silver badges107107 bronze badgesanswered May 10 '16 at 13:36AndrewBramwell47411 gold badge77 silver badges2626 bronze badgesAdd a comment1
I ran MySQL again at now it works.ShareFollowanswered Jan 11 at 12:36rareguy1122 bronze badgesAdd a comment0
ShareFollowedited Jul 19 '19 at 7:54Darren Taylor1,6021212 silver badges1818 bronze badgesanswered Jul 19 '19 at 7:22rohit kumar ranjan1Add a comment0