Okay, first, I know it late, so I don’t know if anyone can promote it, but, oh, okay, well, secondly, removing xampp may not do you any good, because the process using port 3306 ( the default port is Mysql), it will still work somewhere on your system. may be skype, but may not be skype.
therefore, the best way is to find out which process uses port 3306 and then terminate the process.
to find out which process uses port 3306, open a command prompt and enter
netstat -n -o -a
you will get a screen like this.
Then find the address with the port number 3306 and find out the corresponding PID.
Then just open a command prompt as administrator and type
taskkill /F /PID 1234
replace 1234 with your PID. Then you can try running mysql and it will work.
And now, if you are too lazy to take this step again when you restart your computer ,,
you can simply use the following batch version of the script to automatically end the process and use :)
@echo off setlocal enableextensions set "port=3306" for /f "tokens=1,4,5" %%a in ( 'netstat -aon ^| findstr /r /c:"[TU][CD]P[^[]*\[::\]:%port%"' ) do if "%%a"=="UDP" (taskkill /F /PID %%b) else (taskkill /f /PID %%c) endlocal pause
save it as anything.bat and run it every time you want to use mysql. :)