

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 Servers 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. Root privileges on local and remote machines.How to Allow Remote Connection to a MySQL Database Server on RHEL or CentOSīefore starting with this guide, ensure that you have access to the following: If you want to grant remote access to an existing database, keep reading, as we’ll show you how to do it on an RHEL or CentOS server and hPanel. The MySQL server is configured to listen for local incoming connections by default, which means that access to this database server from any remote system is disabled. Accessing the database server from a remote location can also improve hardware performance and security. That’s why many businesses and organizations choose to set up a remote MySQL server, having their database and web server grow at their own pace. However, this setup can be inconvenient and limit scaling opportunities. Hosting and managing MySQL databases and web servers on the same local machine is a common practice.
