SOLVED Can't upgrade from MySQL 5.6 to MariaDB 10.1

aolbrechts

Active Member
Feb 24, 2016
26
1
3
Belgium
cPanel Access Level
Root Administrator
Hello,

I'm trying to upgrade to MariaDB on my server and it won't go through :(
Not sure what to do to fix this ?


Thanks for your help?
Antoine


Error installing MariaDB dependencies: (XID hkba5a) The system failed to execute yum with the arguments “--assumeyes --config /etc/yum.conf --exclude MariaDB-compat install perl-DBI shadow-utils grep coreutils” because of an error: The “/usr/bin/yum” command (process 10753) reported error number 1 when it ended. :

Transaction check error:
package grep-2.20-3.el7.x86_64 is already installed

Error Summary
-------------
Obtained version information from system.
Proceeding with MySQL/MariaDB upgrade despite the following: Normal: The selected MariaDB version (10.1) is more than one generation newer than the currently installed version. The upgrade process will iterate over each intervening version to ensure tables are upgraded appropriately.
 

Attachments

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

It looks like you might have a YUM exclusion added for MariaDB, which isn't a default entry on the exclude= line. Please post the output from the following command:

Code:
grep exclude= /etc/yum.conf
Thank you.
 

aolbrechts

Active Member
Feb 24, 2016
26
1
3
Belgium
cPanel Access Level
Root Administrator
Here is what I get :

exclude=bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* p0f perl* php* proftpd* pure-ftpd* spamassassin* squirrelmail*
 

24x7server

Well-Known Member
Apr 17, 2013
1,912
99
78
India
cPanel Access Level
Root Administrator
Twitter
Hi,

The mysql* term is mentioned in the exclude list, so it will fail until it exists there.. You can just remove this entry from the exclude list once and then execute the upgrade. Are you upgrading it manually or via WHM. If you are upgrading it via WHM, then WHM should automatically adjust this and upgrade properly. How exactly you are upgrading?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Here is what I get :

exclude=bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* p0f perl* php* proftpd* pure-ftpd* spamassassin* squirrelmail*
Hello,

Please remove "mysql*" from the "exclude=" line in the /etc/yum.conf file and try again.

Thank you.
 

aolbrechts

Active Member
Feb 24, 2016
26
1
3
Belgium
cPanel Access Level
Root Administrator
Hello,

Just tried that, and this is the error I get :



Error installing MariaDB dependencies: (XID juf6qz) The system failed to execute yum with the arguments “--assumeyes --config /etc/yum.conf --exclude MariaDB-compat install shadow-utils coreutils perl-DBI grep” because of an error: The “/usr/bin/yum” command (process 21449) reported error number 1 when it ended. :

Transaction check error:
package grep-2.20-3.el7.x86_64 is already installed

Error Summary
-------------
Obtained version information from system.
Proceeding with MySQL/MariaDB upgrade despite the following: Normal: The selected MariaDB version (10.1) is more than one generation newer than the currently installed version. The upgrade process will iterate over each intervening version to ensure tables are upgraded appropriately.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Transaction check error:
package grep-2.20-3.el7.x86_64 is already installed
Hello,

I've seen this happen when the system has duplicate RPMs installed. Try running the following command to see if multiple instances of the "grep" RPM are installed:

Code:
rpm -qa | grep grep
If so, run a command like this for each particular RPM name:

Code:
yum info -v grep-2.20-2.el7.x86_64 | grep -i 'from repo'
Replace "grep-2.20-2.el7.x86_64" from the above example with the actual RPM names found in the prior command. This should tell you which YUM repo (if any) the duplicate RPMs are associated with. You can then run the following command to see which YUM repos are active on your system:

Code:
grep -iR 'enabled=1' /etc/yum.repos.d/
If one of the duplicate "grep" RPMs is not associated with an enabled YUM repo, then you can uninstall it with a command such as:

Code:
rpm -e --nodeps grep-2.20-2.el7.x86_64
You'd replace "grep-2.20-2.el7.x86_64" with the RPM name that's not associated with an enabled YUM repo. Once you do this, you should be able to proceed with the MariaDB upgrade.

Thank you.
 

aolbrechts

Active Member
Feb 24, 2016
26
1
3
Belgium
cPanel Access Level
Root Administrator
I indeed have two installed :

[email protected] [~]# rpm -qa | grep grep
grep-2.20-3.el7.x86_64
grep-2.20-2.el7.x86_64

But when I do
yum info -v grep-2.20-2.el7.x86_64 | grep -i 'from repo'
and
yum info -v grep-2.20-3.el7.x86_64 | grep -i 'from repo'

Nothing happens.

And then after if I do
grep -iR 'enabled=1' /etc/yum.repos.d/

I get this :
/etc/yum.repos.d/cpanel-plugins.repo:enabled=1
/etc/yum.repos.d/cPAddons.repo:enabled=1
/etc/yum.repos.d/EA4.repo:enabled=1
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
But when I do
yum info -v grep-2.20-2.el7.x86_64 | grep -i 'from repo'
and
yum info -v grep-2.20-3.el7.x86_64 | grep -i 'from repo'

Nothing happens.
You'd generally see one of the RPMs show up as coming from the "base" YUM repo. Could you open a support ticket using the link in my signature so we can take a closer look at your system?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

To update, the duplicate RPMS were removed with the following command:

Code:
package-cleanup --cleandupes
This allowed the MySQL/MariaDB upgrade to complete successfully.

Thank you.
 

aolbrechts

Active Member
Feb 24, 2016
26
1
3
Belgium
cPanel Access Level
Root Administrator
Hello,
Yesterday night everything was OK and this morning I’m flooded by client phone calls saying their web sites are down.
It seems Wordpress is looking for MySQL everywhere.
What I don’t understand is that is was working yesterday night AFTER the MariaDB update.
Here is an exemple of the messages received when visiting a web site :
Your PHP installation doesn’t contain MySQL. This extension is required for Wordpress.
Thanks for your urgent help,
Antoine
 

rpvw

Well-Known Member
Jul 18, 2013
1,100
472
113
UK
cPanel Access Level
Root Administrator
Maybe an overnight upcp broke something.

Check your upcp logs to see if there is anything that looks strange.

You may have to update your Easy Apache 4 using yum update, or maybe you need to restart the Apache/PHP-FPM/SQL Server daemons or maybe the SQL components in your PHP need refreshing by un-installing them and re-installing using the WHM >> Software >> Easy Apache 4 interface.

EasyApache 4 Home - EasyApache 4 - cPanel Documentation
 

aolbrechts

Active Member
Feb 24, 2016
26
1
3
Belgium
cPanel Access Level
Root Administrator
Indeed something has happened during the night because there was no MySQL extension installed in EA4 anymore !
Just re-installed and it seems OK, but I have to check if it won't happen every night ...