I had the same problem and i could solve it by checking this aspects:
First of all, accessing your db with an account that accepts remote connections. As mentioned on other posts that account should have a % in the server name instead of a localhost.
I don't know if it is a secure practice to do this but i think it is ok to start.
Example of phpmyadmin lay out
After that you should check the configuration files from
- /etc/mysql
- /etc/mysql/mariadb.conf.d/
I had to deduce from the */etc/mysql/my.conf because it includes this lines
user@debian:/etc/mysql$ cat my.cnf
# The MariaDB configuration file
#
# The MariaDB/MySQL tools read configuration files in the following order:
# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
# 4. "~/.my.cnf" to set user-specific options.
[client-server]
# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/
The thing is the second dir owns this files:
user@debian:/etc/mysql/mariadb.conf.d$ ls
50-client.cnf 50-mysql-clients.cnf 50-mysqld_safe.cnf 50-server.cnf
In which logically, in the 50-server.cnf contains the lines that are referenced in the posts but no longer in /etc/mysql/my.cnf.
Note: The output from this commands has been edited to clarify the answer.
Just comment the bind-address line and connect to your database from a remote terminal.
user@debian:/etc/mysql/mariadb.conf.d$ cat 50-server.cnf
#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#
[server]
[mysqld]
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address = 127.0.0.1
After that my remote connection worked. I hope this helps.