This line makes the system not listen for TCP/IP connections at all.Īfter editing the file, save it by pressing CTRL+X or COMMAND+X if you are on Mac.įor changes to take effect, restart the MySQL service by running the following command: systemctl restart mysqld 2. If there is a line containing skip-networking, make sure to delete it or mark it as a comment by adding # at the beginning. Remember to replace with the specific IP address of the remote machine to which the MySQL server should listen. Once the file opens, locate the line that contains label and add the following code: bind-address= Then, open and edit the MySQL config file using the nano editor: nano /etc/my.cnf To do this, log in to your server as the root user and run the following command to determine the location of the MySQL configuration file: mysql -help | grep "Default options" -A 1 The first step is to make the remote MySQL server listen for external connections by adding an extra option to the configuration file. Changing the MySQL Server Configuration File If you are a Hostinger VPS hosting user, find the login details on the hPanel’s VPS → VPS access tab. Note that you’ll need to establish an SSH connection if the server is outside your data center by using PuTTY on Windows or the built-in terminal shell on Linux and macOS.
0 Comments
Leave a Reply. |