I installed zabbix 4.0 in centOs 7 and configured it to connect to remote mysql.
But log file says that it can not connect to DB.
I tried to telnet to DB machine and I was OK!
telnet 10.1.13.33 3306
Trying 10.1.13.33...
Connected to 10.1.13.33.
here is my /etc/zabbix/zabbix_server.conf:
SourceIP=10.1.9.140
LogFile=/var/log/zabbix/zabbix_server.log
LogFileSize=0
DebugLevel=5
PidFile=/var/run/zabbix/zabbix_server.pid
SocketDir=/var/run/zabbix
DBHost=10.1.13.33
DBName=zabbix
DBUser=zabbix
DBPassword=******************
DBPort=3306
SNMPTrapperFile=/var/log/snmptrap/snmptrap.log
Timeout=4
AlertScriptsPath=/usr/lib/zabbix/alertscripts
ExternalScripts=/usr/lib/zabbix/externalscripts
LogSlowQueries=3000
When starting zabbix, in /var/log/zabbix/zabbix_server.log there is a line like this:
[Z3001] connection to database 'zabbix' failed: [2003] Can't connect to MySQL server on '10.1.13.33' (13)
database is down: reconnecting in 10 seconds
By default, Zabbix server does not understand which IP to be listened. So you have to also mention your ListenIP in /etc/zabbix/zabbix_server.conf:
ListenIP=<your_ip>
Related
Hello I have a MySQL server running in a suse machine, I can connect from the localhost using workbench but I can't from a remote windows machine.
I have set bind address to 0.0.0.0 on the my.cnf file on the server and I have assured that port is open.
In fact I do a telnet to the port from the windows machine and it connects.
When I try to connect from workbench on the remote machine the following error appears:
Lost connection to MySQL server at 'waiting for initial communication packet' error 10060
I have found a other post which explain how to address that but I guess that only works if the server is running on a Windows machine:
Lost connection to MySQL server at 'waiting for initial communication packet'
How could I replicate that in a linux machine? Thanks
PS: I am connecting through TCP.
I don't know what to try.
I got this problem where I have developed a Laravel application which uses or connects to a external database.
I have copied all Laravel files in a CentOS server that needs to connect to a MySQL database that is located in another (Ubuntu) server.
Locally, I didn't have any trouble with Laravel Homestead.
But now the Laravel app throws the following error:
SQLSTATE[HY000] [2006] MySQL server has gone away
And if I try to connect to the external database from the CentOS terminal,
$ mysql -h xxx.xxx.xxx.xxx -P 3306 -u user4laravel -p
I get this other error:
ERROR 2013 (HY000): Lost connection to MySQL server at 'handshake:
reading inital communication packet', system error: 11
Notes: I connect to that server via SSH Tunnel with SSH-KEY and passphrase. Do I have to create a tunnel connection?
How do I make it persistent? Is this practical? Or ...
Does anybody know how to solve this or a workaround?
Every time I try to connect to my mySQL on mysql workbench, it gives me this error message saying:
Your connection attempted failed for user 'root' from your host to server at http:x.x.x.x:3306: Cannot open SSH Tunnel:Error connecting SSH tunnel:Error Connecting to SSH server Error 11004 get addrinfo failed
I think you could get solution here: http://quintagroup.com/services/support/tutorials/mysql-linux
or follow this steps:
Open putty and accept the certificate of the server
hostname should be localhost ( in order to use local socket and not http conection)
local port should be something like 33010 not 3306
local port is the conection back port used by the plink and has nothing to do with mysql ports
I am using Fedora 18 and recently installed MySQL workbench.
I created a new connection in MySQL workbench, but when trying to open I get the following error:
Cannot Connect to Database Server
Your connection attempt failed for user 'root' from your host to server at 127.0.0.1:3306:
Can't connect to MySQL server on '127.0.0.1' (111)
Please:
Check that mysql is running on server 127.0.0.1
Check that mysql is running on port 3306 (note: 3306 is the default, but this can be changed)
Check the root has rights to connect to 127.0.0.1 from your address (mysql rights define what clients can connect to the server and from which machines)
Make sure you are both providing a password if needed and using the correct password for 127.0.0.1 connecting from the host address you're connecting from
Any idea what the issue would be?
Fedora 18 is a Linux Based Operating System and it works on chmod 777. so there should be authentication problem. otherwise server 127.0.0.1 and host name , username same as we keep in windows. you need to set authentication.
once i try to connect to mysql on phpmyadmin in ubuntu i got this error
2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)
but with mysql query browser i connect with out any error and it works
why phpmyadmin does not connect?
The command line client uses a unix domain socket while PHPmsyqladmin uses a network socket. You'll need to enable the network socket in the mysql config, most likely.
EDIT:
You can read about some of the troubleshooting (and windows) side of this: http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html
And here is how to set up mysql to use a network config:
http://www.howtogeek.com/howto/mysql/switch-mysql-to-listen-on-tcp/