0

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.

enter image description here

However, I can access the server via 'tcp/ip over ssh', but when I connect using 'tcp/ip' I get 10060 error. enter image description here

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

  1. the user and host:

enter image description here

  1. and 3. the settings file in /etc/my.cnf: enter image description here

  2. server.cnf

enter image description here

  1. mysqld enter image description here

  2. bind-adress and skip-networking enter image description here

2
  • Please check all you config files, see the include command at the end of /etc/my.cnf. The settings you're looking for are probably in /etc/my.cnf.d/server.cnf.
    – dbdemon
    Jun 3, 2018 at 10:55
  • @dbdemon I have checked the config files, they are just empty, no configuration set in those files. Jun 3, 2018 at 11:02

1 Answer 1

2

Four things to check:

  1. 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.
  2. Make sure that the skip-networking variable is not enabled in the configuration files.
  3. 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.

  1. Make sure the firewall on CentOS isn't blocking access:

    sudo firewall-cmd --zone=public --permanent --add-service=mysql

    sudo systemctl restart firewalld

25
  • I have update the information of your "three things to check", please have a look where the problem might be. Jun 3, 2018 at 9:55
  • If you want to ensure that people are alerted to the fact that you've responded to a comment, put @ in front or their handle - i.e. for me it's @Vérace - p.s. welcome to the forum! Just a small thought on the problem - do you have rules on the server disabling non-ssh connections?
    – Vérace
    Jun 3, 2018 at 10:18
  • @Vérace I don't know how to check if I have disabled the non-ssh connections, but ping works. Jun 3, 2018 at 11:00
  • Use putty and try to login not using ssh?
    – Vérace
    Jun 3, 2018 at 11:05
  • @buzhidao I think skip-networking was only used in config files of older MariaDB versions, so you may or may not find that in the config files, but I suspect bind-address is still there.
    – dbdemon
    Jun 3, 2018 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.