zarplata / zabbix-agent-extension-mysql

Zabbix extension for monitoring mysql.
23 stars 18 forks source link

connection refused #7

Closed exhang closed 5 years ago

exhang commented 5 years ago

Hello, zabbix-agent-extension-mysql no connect my mariaDB: can't do query SHOW GLOBAL STATUS. └─ dial tcp [::1]:3306: connect: connection refused or: can't get galera stats. └─ can't do query SHOW GLOBAL STATUS LIKE 'wsrep_%'. └─ dial tcp 127.0.0.1:3306: connect: connection refused

Local user true authorize on mysql client.

tears-of-noobs commented 5 years ago

@exhang Hi. Your MySQL/MariaDB running and listening port 3306? Could you please show me an output of the command ss -nlp | grep 3306 and telnet 127.0.0.1 3306 ?

exhang commented 5 years ago

ss -nlp | grep 3306 tcp LISTEN 0 70 xxx.xxx.xxx.xxx (my IP):3306 0.0.0.0:* users:(("mysqld",pid=759,fd=36)) root@front:~# telnet 127.0.0.1 3306 Trying 127.0.0.1... telnet: Unable to connect to remote host: Connection refused

My MariaDB whas SSL certificates.

exhang commented 5 years ago

telnet [myip] 3306 Trying [myip].. Connected to [myip]. Escape character is '^]'. 5.5.5-10.3.12-MariaDB-1:10.3.12+maria~bionic-log»

exhang commented 5 years ago

i make a mistake ip. Thanks. Now:

root@front:~# /usr/bin/zabbix-agent-extension-mysql -m [myip]:3306 --user zabbix --pass [mypass]--discovery
can't get galera stats.
└─ can't do query SHOW GLOBAL STATUS LIKE 'wsrep_%'.
   └─ Error 1045: Access denied for user 'zabbix'@'front' (using password: YES)
root@front:~# /usr/bin/zabbix-agent-extension-mysql -m [myip]:3306 --user root --pass [mypass] --discovery
can't get galera stats.
└─ can't do query SHOW GLOBAL STATUS LIKE 'wsrep_%'.
   └─ Error 1045: Access denied for user 'root'@'front' (using password: YES)
tears-of-noobs commented 5 years ago

@exhang Has your database server has remote access by root user?

exhang commented 5 years ago

@exhang Has your database server has remote access by root user?

Hah, yes, my configuration mariadb is broken, thanks, every job.