If I change the default port number (3306) of MySQL during installation, then will it cause any problem?
I need to use MySQL Community Edition 8.0CE and XAMPP both of them. But XAMPP can’t start the MySQL service, it’s showing error; because XAMPP use the same port (3306) for MySQL, which port is using by MySQL Workbench. That is the error, which is showing in XAMPP:-
01:45:09 AM [mysql] Problem detected! 01:45:09 AM [mysql] Port 3306 in use by "Unable to open process"! 01:45:09 AM [mysql] MySQL WILL NOT start without the configured ports free! 01:45:09 AM [mysql] You need to uninstall/disable/reconfigure the blocking application 01:45:09 AM [mysql] or reconfigure MySQL and the Control Panel to listen on a different port 01:45:09 AM [mysql] Attempting to start MySQL app… 01:45:09 AM [mysql] Status change detected: running 01:45:29 AM [mysql] Status change detected: stopped 01:45:29 AM [mysql] Error: MySQL shutdown unexpectedly. 01:45:29 AM [mysql] This may be due to a blocked port, missing dependencies, 01:45:29 AM [mysql] improper privileges, a crash, or a shutdown by another method. 01:45:29 AM [mysql] Press the Logs button to view error logs and check 01:45:29 AM [mysql] the Windows Event Viewer for more clues 01:45:29 AM [mysql] If you need more help, copy and post this 01:45:29 AM [mysql] entire log window on the forums
So I want to reinstall MySQL Community Server with different port number. will it cause any problem? what other port number should I use?
You can definitely change the port without issue, but it’s probably best to choose a port between 1024-49151 and avoid registered ports to prevent port conflicts.
Also note that many MySQL client libraries and programs will assume port 3306 but should always provide a way of specifying your own port.