Answer the question
In order to leave comments, you need to log in
Why is it not possible to connect to mysql?
Hello.
Oracle Linux 7.4
Linux zabbixdb01 4.1.12-103.3.8.el7uek.x86_64 #2 SMP Mon Aug 21 17:27:54 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux
SELECT @@version;
+-----------+
| @@version |
+-----------+
| 5.7.19 |
+-----------+
select host, user from mysql.user;
+-----------+---------------+
| host | user |
+-----------+---------------+
| % | zabbix |
| localhost | mysql.session |
| localhost | mysql.sys |
| localhost | root |
+-----------+---------------+
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 651/sshd
tcp6 0 0 :::3306 :::* LISTEN 689/mysqld
tcp6 0 0 :::22 :::* LISTEN 651/sshd
udp 0 0 127.0.0.1:323 0.0.0.0:* 414/chronyd
udp6 0 0 ::1:323 :::* 414/chronyd
Answer the question
In order to leave comments, you need to log in
It is necessary to register in the my.cnf config the address of the interface on which mysql will listen for connections.
bind-address directive.
If access is only from the localhost, then accordingly bind-address = 127.0.0.1, if you connect from the outside, then the address of the interface to which you have access.
And for access from the outside, you need to give the zabbix user permissions to connect from external addresses (you will need to specify all ip), and also register allowing rules on the firewall for these addresses (these addresses can be ip from your local subnet, not necessarily public ip)
Allow access for I strongly do not recommend all addresses, this is a security hole.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question