Can MariaDB be replaced with MySQL on local Nagios XI?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
azreenariff
Posts: 49
Joined: Tue Aug 21, 2018 7:58 am

Can MariaDB be replaced with MySQL on local Nagios XI?

Post by azreenariff »

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.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

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

Post by mcapra »

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
https://www.mcapra.com/
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

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

Post by mbellerue »

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!
azreenariff
Posts: 49
Joined: Tue Aug 21, 2018 7:58 am

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

Post by azreenariff »

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.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

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

Post by mbellerue »

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!
azreenariff
Posts: 49
Joined: Tue Aug 21, 2018 7:58 am

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

Post by azreenariff »

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
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

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

Post by mbellerue »

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!
azreenariff
Posts: 49
Joined: Tue Aug 21, 2018 7:58 am

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

Post by azreenariff »

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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post by scottwilkerson »

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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked