Question :
I have one Linux computer(CentOS7.4) as server, one windows computer. I have setup the mariadb server. On windows, I use mysql-workbench as client.
However, I can access the server via ‘tcp/ip over ssh’, but when I connect using ‘tcp/ip’ I get 10060 error.
By the way, I can ping 192.168.1.11
, it seems the network is ok. Therefore, what’s wrong with my setting?
three things to check
- the user and host:
Answer :
Four things to check:
- Check that the DB user allows for connecting from the remote client. A user has a both a ‘user’ and a ‘host’ component.
SELECT user, host FROM mysql.user;
will show your users including their hosts, i.e. the clients they allow. You can use the wildcard ‘%’ to allow connecting from any client, or a specific IP address or hostname if you prefer that. - Make sure that the
skip-networking
variable is not enabled in the configuration files. - Make sure
bind-address
is either not enabled or pointing to a specific IP address you want to allow in the configuration files.
Once you have updated the configuration files, restart MariaDB.
Check the MariaDB documentation on configuring for remote client access for details.
-
Make sure the firewall on CentOS isn’t blocking access:
sudo firewall-cmd --zone=public --permanent --add-service=mysql
sudo systemctl restart firewalld