Page 1 of 1

Issue setting up a remote DB server

Posted: Fri May 18, 2012 11:54 am
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

Re: Issue setting up a remote DB server

Posted: Fri May 18, 2012 12:51 pm
by mguthrie
Make sure the firewall port is open. From the nagios server, run:

Code: Select all

nc <hostaddress> -z 3306

Re: Issue setting up a remote DB server

Posted: Mon May 21, 2012 2:59 pm
by brian.gamble
-bash: nc: command not found
message recieved when attempting to run the suggested command on the XI server

Re: Issue setting up a remote DB server

Posted: Mon May 21, 2012 3:51 pm
by lmiltchev
Run in terminal:

Code: Select all

yum install -y nc
Hope this helps.

Re: Issue setting up a remote DB server

Posted: Tue May 22, 2012 2:07 pm
by brian.gamble
Connection to x.x.x.x (NagiosXI server IP) 3306 port [tcp/mysql] succeeded!

Re: Issue setting up a remote DB server

Posted: Tue May 22, 2012 2:40 pm
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

Re: Issue setting up a remote DB server

Posted: Tue May 22, 2012 2:48 pm
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?