![]() ![]() Let me show you how to change the port number in XAMPP.įirst, open XAMPP, and go to “Manage Servers” on the right side of the window you will find the “Configure” button, click on it. When you are connected to the MySQL server and you want to check the port that is being used by your client to connect with MySQL server, you can retrieve the value of the variable named port that stores the port number used for the connection. hostip represents the IP address of the machine where the server is running. The port number or Unix socket file name might be different in your setup. Instead of removing MySQL, just change the MySQL port to something else in XAMPP and restart your service to fix this issue. If a mysqld process is running, you can check it by trying the following commands. To fix the above issue, you can either uninstall MySQL from your system or else you can change the MySQL port number from XAMPP. XAMPP starts its own MySQL server on port 3306, but port 3306 can be used by only one of the applications at a time. If you are pondering why this occurs, then one of the reasons is that MySQL is already installed and running on your system. Connections to remote servers use TCP/IP. If you too have the same problem, then you need to change the default 3306 port to something else. Here is what happens if I try to connect to this server remotely: mysql -h10.0.0.2 -uroot -pmypassowrd ERROR 2003 (HY000): Can't connect to MySQL server on '10.0.0.2' (111) telnet 10.0.0.2 3306 Trying 10.0.0.2. Your IP Address Use Current IP Port Number What is Port Checker Port Checker is a simple and free online tool for checking open ports on your computer/device, often useful in testing port forwarding settings on a router. This is quite a common problem among XAMPP users when they click on the start button to launch the XAMPP server on their system. Check for open ports and verify port forwarding setup on your router. How to fix MySQL port 3306 already in use error on XAMPP That’s all to change the MySQL port number on Linux and other Ubuntu or any other Debian-based machine. If it is there, then you are good to save this configuration file. Once you open the file, search for “mysqld” block, add the port attribute if it is not available, and specify the port number like the below code snippet: port = 3308 So, let me show you how to change your default MySQL port from 3306 to something else in Linux, open the above-mentioned file using any command-line editor with sudo privilege: $ sudo nano /etc/mysql/conf.d/nf ![]() Modify any of the below files to change your default port for MySQL: /etc/mysql/conf.d/mysqld.cnf OR /etc/mysql/mysql.cnf To change the MySQL port number you need to modify “mysqld.cnf” file which you will get most probably in “/etc/mysql//” or you can also use “/etc/mysql/my.cnf” to modify port number but I would suggest you to use “” because you will find other attributes likes “pid-file”, “socket”, “log-error” and all at one place so whenever you need to make any changes you can eaily do without looking into multiple files. Error Starting MySQL / PHPMyAdmin In XAMPP: How To Solve? How to change MySQL port number in Ubuntu ![]()
0 Comments
Leave a Reply. |