How to grant remote access to MariaDB Server on Debian 9 Stretch

grant remote access to MariaDB Server on Debian 9

MySQL Server (MariaDB) remote access is disabled by default. With little tweak we can easily enable or grant remote access to MySQL Server. I am running MariaDB on my Debian 9 server. You may use this tutorial on other distribution with little modifications. Initially I could not connect to my remote MySQL Server from my backup software. If this is your case, you will need to enable remote access to the MySQL Server.

grant remote access to MariaDB Server on Debian 9

Note:

Before you continue, I am using Debian 9 to host my MariaDB Server. I will show you how to edit the MariaDB configuration file on Debian 9. This configuration file might be different for some other distributions. 

Steps to grant remote access to MariaDB Server on Debian 9

Step 1. Locate the correct .cnf file

Ok, first go to /etc/mysql/ directory and look for mariadb.conf.d directory you should see the following configuration files listed there.

Step 2. Edit 50-server.cnf file

Now we want to make some edit to the file 50-server.cnf

Now scroll down and find the following line:

We need to comment this line to enable remote access to our MariaDB Server. So now it should looks like this:

Now close and save the file.

Step 3. Restart MySQL Server service

We need to restart MySQL Service afterward

Done. Now we can try to connect to our MariaDB Server from other computer. It should works by now.

Additional Step

If you want to connect to your MySQL Database from remote computer, make sure your user is capable to do this remote access. If not, we need to create a new user or modify it so the user can access from any hosts.

Thanks for reading this tutorial how to grant remote access to MariaDB Server on Debian 9. See you on the next tutorial.

1 Trackback / Pingback

  1. Connect MySQL Server on HeidiSQL - Free MySQL Guide

Leave a Reply

Your email address will not be published.


*