Open Remote Connection Port on MySQL / MariaDB

By default, MySQL is not listening for external connections. This means you will get error when trying to establish remote connection to your MySQL. The MySQL options file needed to configure for this to work.

Please follow steps.

  1. Open your MySQL configuration file. MySQL config file is normally at /etc/my.cnf. You need to open it using the nano or any other editor:
nano /etc/my.cnf
bind_address = # Change to to allow remote connections

2. Note that you have to replace YOUR.SERVER.IP with your actual dedicated IP address OR in my case and then start your MySQL daemon by running this command:

systemctl restart mysqld

Check your port using any tool like for instance you can go to this website

Or you can download any MySQL tool like

  • Navicat for MySQL
  • MySQL Workbench
  • Heidi SQL

Here is the screenshot of MySQL Workbench which is free tool:

Remote MySQL Connection Working

Note: Your connecting ip must be added under the Cpanel Remote MYSQL Access Host list. Also check your firewall/CSF that default MySQL remote port i.e. 3306 is opened or not.

Notify of
1 Comment
Newest Most Voted
Inline Feedbacks
View all comments

[…] Open Remote Connection Port on MySQL / MariaDB […]