Can MariaDB be replaced with MySQL on local Nagios XI?

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

Can MariaDB be replaced with MySQL on local Nagios XI?

Postby azreenariff » Mon Sep 09, 2019 9:47 pm

Hi. How can we replace the MariaDB on local Nagios XI server to MySQL instead? As I know, MariaDB is part of Nagios XI dependancy. Any way we can replace MariaDB with MySQL instead on local Nagios XI server?

Thanks.
azreenariff
 
Posts: 25
Joined: Tue Aug 21, 2018 7:58 am

Re: Can MariaDB be replaced with MySQL on local Nagios XI?

Postby mcapra » Tue Sep 10, 2019 9:55 am

Depending on how it is done, I could see this creating some package conflicts, or issues with library dependencies, with future Nagios XI updates.

But you could definitely offload the Nagios XI database needs to a a different server and avoid all of that:
https://assets.nagios.com/downloads/nag ... Server.pdf

I'd defer to a support tech on long-term support of MySQL versus MariaDB. There's never been much of a difference between the two on the surface, though testing both setups between releases adds overhead.
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3587
Joined: Thu May 05, 2016 3:54 pm

Re: Can MariaDB be replaced with MySQL on local Nagios XI?

Postby mbellerue » Tue Sep 10, 2019 12:29 pm

Thanks for jumping in, Matt!

azreenariff, MariaDB is meant to be a drop-in replacement for MySQL, so you should be pretty safe going in the other direction and replacing MariaDB with MySQL. As Matt mentioned, the absolute safest way would be to off-load the database to another machine or VM.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mbellerue
 
Posts: 949
Joined: Fri Jul 12, 2019 11:10 am

Re: Can MariaDB be replaced with MySQL on local Nagios XI?

Postby azreenariff » Tue Sep 10, 2019 9:15 pm

Hi mcapra & mbellerue,

Thank you so much for your replies. Our client requires us to replace MariaDB to MySQL locally and not offloading to another server. However, MariaDB is a package dependency of NagiosXI and if MariaDB is removed, yum will also remove NagiosXI. And if we install the MySQL package, it will replace MariaDB and uninstall it too. Let's say we have pre-installed MySQL, If we install Nagios XI, it will also want to install MariaDB and would replace MySQL and uninstall it too. Am I correct? Whit this, would you know if there is any way we can get past this? :)

Thanks.
azreenariff
 
Posts: 25
Joined: Tue Aug 21, 2018 7:58 am

Re: Can MariaDB be replaced with MySQL on local Nagios XI?

Postby mbellerue » Wed Sep 11, 2019 10:08 am

Running a yum erase mariadb might delete the databases, but it won't uninstall Nagios XI. I was able to uninstall MariaDB, and install MySQL Community 5.7.27. In my case it did not delete the databases, but I would highly recommend making a backup of the databases before attempting the move.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mbellerue
 
Posts: 949
Joined: Fri Jul 12, 2019 11:10 am

Re: Can MariaDB be replaced with MySQL on local Nagios XI?

Postby azreenariff » Wed Sep 11, 2019 9:00 pm

My Nagios XI was installed offline, and so it uses rpm of Nagios XI. So, when trying to install MySQL, it complains of the dependency as below:

--> Finished Dependency Resolution
Error: Package: nagiosxi-5-4.13.el7.x86_64 (installed)
Requires: mariadb-server
Removing: 1:mariadb-server-5.5.56-2.el7.x86_64 (installed)
mariadb-server = 1:5.5.56-2.el7
Obsoleted By: mysql-community-server-5.7.27-1.el7.x86_64 (mysql57-community)
Not found
Updated By: 1:mariadb-server-5.5.60-1.el7_5.x86_64 (base)
mariadb-server = 1:5.5.60-1.el7_5
Error: Package: nagiosxi-5-4.13.el7.x86_64 (installed)
Requires: mariadb
Removing: 1:mariadb-5.5.56-2.el7.x86_64 (installed)
mariadb = 1:5.5.56-2.el7
Obsoleted By: mysql-community-client-5.7.27-1.el7.x86_64 (mysql57-community)
Not found
Updated By: 1:mariadb-5.5.60-1.el7_5.x86_64 (base)
mariadb = 1:5.5.60-1.el7_5
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest


Any way to counter this? :D
azreenariff
 
Posts: 25
Joined: Tue Aug 21, 2018 7:58 am

Re: Can MariaDB be replaced with MySQL on local Nagios XI?

Postby mbellerue » Thu Sep 12, 2019 12:41 pm

Let's try this. Once you've gone through the offline installation process for Nagios XI, and you have a confirmed working system.

Make a backup of /var/lib/mysql/

Remove MariaDB
Code: Select all
rpm -e --nodeps mariadb-server-5.5.56-2.el7.x86_64


Install MySQL. It looks like you've got an RPM for MySQL, so I'll leave that process up to you.

Now, removing MariaDB shouldn't have removed the databases, so once MySQL is installed, you may have a functioning system once again. But, if the databases were removed, restore your backup.

Finally, make sure to block MariaDB so that it doesn't get installed during an update sometime down the road.
https://www.tecmint.com/yum-lock-disabl ... e-version/

Also, you're going to MySQL 5.7, this KB will be helpful.
https://support.nagios.com/kb/article/n ... s-780.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mbellerue
 
Posts: 949
Joined: Fri Jul 12, 2019 11:10 am

Re: Can MariaDB be replaced with MySQL on local Nagios XI?

Postby azreenariff » Thu Sep 12, 2019 11:11 pm

Hi,

I managed to counter this by backing up Nagios XI - remove Nagios XI RPMs - reinstall same version of Nagios XI manually online - restore Nagios XI from backup - remove MariaDB - install MySQL - change Nagios XI 'mysql' variable value to 'mysqld'

Thanks for your kind assistance all.
azreenariff
 
Posts: 25
Joined: Tue Aug 21, 2018 7:58 am

Re: Can MariaDB be replaced with MySQL on local Nagios XI?

Postby scottwilkerson » Fri Sep 13, 2019 7:02 am

azreenariff wrote:Hi,

I managed to counter this by backing up Nagios XI - remove Nagios XI RPMs - reinstall same version of Nagios XI manually online - restore Nagios XI from backup - remove MariaDB - install MySQL - change Nagios XI 'mysql' variable value to 'mysqld'

Thanks for your kind assistance all.

Great!

Locking
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 17032
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios XI

Who is online

Users browsing this forum: MSN [Bot] and 10 guests