By default, mysql/mariadb server config is to only listen on localhost (127.0.0.1). To allow remote connections, you have to bind to a real IP address. You can specify a specific IP to restrict things. Alternatively, you can bind to all IPs by commenting out this line:
#bind-address = <some ip-address>
You posted your config, and I did not see this line, but make sure you don't have a bind-address line anywhere in your config.
Also ensure you are not skipping the network config. You want this line commented out:
#skip-networking
Documentation about allowing remote access that explains this in more details is here:
https://mariadb.com/kb/en/library/configuring-mariadb-for-remote-client-access/
You also need to create a user who is allowed to connect from either all hosts or the specific host(s) or network(s) you will connect from. See the mariadb documentation link above for details about creating users who can connect from remote hosts. For example, to create a "bloguser" user that has all privs for all tables in your "myblog" database and can connect from any remote host:
GRANT ALL PRIVILEGES ON myblog.* TO 'bloguser'@'%' IDENTIFIED BY 'bloguser-password';
Of course your networking config needs to allow port 3306 (or your custom port if changed) access to your database through any firewalls you may have. You can test basic network access from a remote host using telnet. Let assume your database server IP is 1.2.3.4. At the command line on the remote machine, try:
telnet 1.2.3.4 3306
Wait for things to succeed, fail, or time out. Here are some results you might see and potentially what they mean:
- "Connected to 1.2.3.4" SUCCESS!
- "Unable to connect to remote host: Connection timed out" You have a route, but not getting through. Could be firewall on the server not allowing 3306. Could be your own network not allowing 3306 outbound.
- "Unable to connect to remote host: No route to host" Your system does not even know how to get to that network.
- "Unable to connect to remote host: Connection refused" A common reason for this is that mariadb is not running or is not listening on that IP and port. (bound to 127.0.0.1 for example). It could be that a firewall refused the connection.
Best Answer
I know this is an older question, but @PimpJuiceIT answer worked for me in a very similar situation, so full credit to @PimpJuiceIT
Open an elevated command prompt (press windows, type "cmd", right click on "Command prompt" and run as administrator)
Type in the following code, but replace the "4444" with the port you need to access
netsh advfirewall firewall add rule name="TCP Port 4444" dir=in localport=4444 protocol=TCP action=allow
press enter, you should get a confirmation text.
Test to ensure you can now access the app through network.