Issue setting up a remote DB server

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
brian.gamble
Posts: 43
Joined: Thu Sep 29, 2011 11:07 am

Issue setting up a remote DB server

Post by brian.gamble »

Going through the "Offloading MySQL to Remote Server" instruction document and am having issues binding the server IP.

I setup the remote DB server on my laptop by installing CENTOS 6.2 in a VM running on VMware Player. I edit the my.cnf file as described in the document but cannot establish a connection from the NagiosXI server to the MySQL server. When I open the mysqld.log file it states:

[ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
[ERROR] Do you already have another mysqld server running on port: 3306?
[ERROR] Aborting

Any suggestions or ideas what I'm doing wrong?

Thanks
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Issue setting up a remote DB server

Post by mguthrie »

Make sure the firewall port is open. From the nagios server, run:

Code: Select all

nc <hostaddress> -z 3306
brian.gamble
Posts: 43
Joined: Thu Sep 29, 2011 11:07 am

Re: Issue setting up a remote DB server

Post by brian.gamble »

-bash: nc: command not found
message recieved when attempting to run the suggested command on the XI server
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Issue setting up a remote DB server

Post by lmiltchev »

Run in terminal:

Code: Select all

yum install -y nc
Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
brian.gamble
Posts: 43
Joined: Thu Sep 29, 2011 11:07 am

Re: Issue setting up a remote DB server

Post by brian.gamble »

Connection to x.x.x.x (NagiosXI server IP) 3306 port [tcp/mysql] succeeded!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Issue setting up a remote DB server

Post by lmiltchev »

Do you have these three lines in the "/etc/my.cnf" file?

Code: Select all

bind-address=<IP address of this computer, the computer with MySQL on it>
port=3306
#skip-networking
Did you restart mysqld?

Code: Select all

service mysqld restart
Be sure to check out our Knowledgebase for helpful articles and solutions!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issue setting up a remote DB server

Post by scottwilkerson »

That is to your XI server which we know is currently running, run the command the other way

Code: Select all

nc <LAPTOP_VMWARE_MYSQL_SERVER_IP> -z 3306
Also, just a sanity check, are you sure you want to offload the MYSQL database server to a VM running on your laptop?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked