This guide will take you through how to enable remote database connection on Cyberpanel and access the database remotely.
Step 1: Access your server via SSH. #
ssh root@your-server-ip (ssh [email protected])

Step 2 : Open the mariadb config file (50-server.cnf) #
Using your text editor type.
Using vim
vim /etc/mysql/mariadb.conf.d/50-server.cnf
Using nano
nano /etc/mysql/mariadb.conf.d/50-server.cnf

Step 3 : Edit the bind address from localhost to all address (from 127.0.0.1 to 0.0.0.0) #
Default

New Edited

Changing the listening address to 0.0.0.0
allows listening for connections from all IP addresses.
If you need only one IP address to access the database server remotely, then put your IP address there instead.
Save your changes and exit.
Step 4: Allow PORT 3306
through firewall on Cyberpanel dashboard. #
Login to cyberpanel ->Security -> Firewall and add port 3306
Then restart Firewall.

That’s it

Step 5 : Create a test database to use.

Go to List Databases and click on Manage

Use the wildcard ” %
” character

Step 6: Access remotely.
Try accessing the database from your application such as Mysql workbech or DBeaver.
Using Dbeaver.


Test Connection’
It should be successful

All Done and connection successful.
