Enable remote access to MySQL Server/MariaDB

Hello Manjaro users !
Manjaro is a great Operating System for desktop but that does not means that Manjaro is not good for server use. I was successfully installed MySQL Server (MariaDB Server) on my Manjaro 16.10. You may want to read how to install MariaDB Server on Manjaro before jumping into this tutorial.

Here I want to share how to enable remote access to MySQL server installed on Manjaro Linux. By default, MySQL server only accessible from local computer where the MySQL/MariaDB is installed. Now how to connect and manage the server from other computer on the same network or even from the internet globally?

How to enable remote access to MySQL Server on Manjaro

To enable remote access, open Terminal and edit the file /etc/mysql/my.cnf
sudo nano /etc/mysql/my.cnf
Now add the following line to your my.cnf file
Change with your Manjaro IP address where MySQL is installed. Restart the mysqld service afterward
sudo systemctl restart mysqld