Offload MySql to remote server.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tbarnett
Posts: 52
Joined: Thu Jul 26, 2012 8:36 am

Offload MySql to remote server.

Post by tbarnett »

So I have followed the document https://assets.nagios.com/downloads/nag ... Server.pdf

I'm successfully at the place where I am sending data from the old NagiosXI server DB to the new stand alone DB.

This command (mysqldump -u root -p'nagiosxi' nagios | mysql -u nagios -p'nagiosP@ssw0rd' -h 10.200.4.160 nagios) results in an error.
[root@nagios barnt]# mysqldump -u root -p'nagiosxi' nagios | mysql -u nagios -p'nagiosP@ssw0rd' -h 10.200.4.160 nagios
mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `nagios_notifications` at row: 1834

The dump for the other two databases works correctly.

I did successfully run the rebuild databases command before I started this process.

Can someone tell me why this is not working?

thx

Tom
Tom Barnett
Senior Systems Administrator
Prime, inc.
2740 N. Mayfair Ave
Springfield, MO 65803
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Offload MySql to remote server.

Post by gsmith »

Hey Tom,

It might be a large table. Let's add the --quick and --max_allowed_packet=512M options.

So now your command would be:

Code: Select all

mysqldump -u root -p'nagiosxi' --quick --max_allowed_packet=512M nagios | mysql -u nagios -p'nagiosP@ssw0rd' -h 10.200.4.160 nagios
Let me know how that works.

Thanks
tbarnett
Posts: 52
Joined: Thu Jul 26, 2012 8:36 am

Re: Offload MySql to remote server.

Post by tbarnett »

It was a large table. I ended up doing a dump with MySQL workshop and then an import.

That worked and my Nagios DB is running on a separate server now.

Thanks for the reply.

Tom
Tom Barnett
Senior Systems Administrator
Prime, inc.
2740 N. Mayfair Ave
Springfield, MO 65803
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Offload MySql to remote server.

Post by gsmith »

Hi

That was going to be Plan B ;)

Glad you got it solved.

Locking thread.
Locked