Control Web Panel

WebPanel => Updates => Topic started by: dp41646 on November 29, 2020, 12:35:12 PM

Title: MariaDB update failed
Post by: dp41646 on November 29, 2020, 12:35:12 PM
Hi,
today I've received notification for MariaDB update to version 10.2.36-1.el7.centos   
This is part of log:

This is a brief description of the upgrade process.  Important details
can be found in the MariaDB manual, in the Upgrading section.
******************************************************************
error: %pre(MariaDB-server-10.2.36-1.el7.centos.x86_64) scriptlet failed, exit status 1
  Verifying  : MariaDB-server-10.1.48-1.el7.centos.x86_64                   1/2
  Verifying  : MariaDB-server-10.2.36-1.el7.centos.x86_64                   2/2

Failed:
  MariaDB-server.x86_64 0:10.1.48-1.el7.centos                                 
  MariaDB-server.x86_64 0:10.2.36-1.el7.centos                                 

Complete!
Title: Re: MariaDB update failed
Post by: comeback on November 29, 2020, 02:21:20 PM
Hello,

I have the same problem, I have the pro version.

Thank you, for the one who has a solution.
Title: Re: MariaDB update failed
Post by: comeback on November 29, 2020, 02:34:36 PM
Here is the solution I found:

First step to save your database (I didn't do it!)

Code: [Select]
mysqldump --all-databases > /home/fullbackup.sql.gz
Uninstall MariaDB client:

Code: [Select]
yum remove MariaDB-server MariaDB-client -y
Now install MariaDB, it will automatically install MariaDB 10.2 (10.2.36):

Code: [Select]
yum install MariaDB-server MariaDB-client -y
Then to finish:

Code: [Select]
mysql_upgrade
Title: Re: MariaDB update failed
Post by: acss001 on November 30, 2020, 12:11:24 PM
Is it really necessary to do this upgrade? Do we have to?
Title: Re: MariaDB update failed
Post by: ehstbr on December 01, 2020, 01:28:12 AM
I'll wait for a CWP official solution, probably a script update to do the upgrade process automatically...
Title: Re: MariaDB update failed
Post by: ehstbr on December 01, 2020, 02:26:16 AM
Here is the solution I found:

First step to save your database (I didn't do it!)

Code: [Select]
mysqldump --all-databases > /home/fullbackup.sql.gz
Uninstall MariaDB client:

Code: [Select]
yum remove MariaDB-server MariaDB-client -y
Now install MariaDB, it will automatically install MariaDB 10.2 (10.2.36):

Code: [Select]
yum install MariaDB-server MariaDB-client -y
Then to finish:

Code: [Select]
mysql_upgrade

You didn't do the all procedure or only the backup step?

It worked for you?
Title: Re: MariaDB update failed
Post by: dp41646 on December 01, 2020, 07:42:01 AM
I'll wait for a CWP official solution, probably a script update to do the upgrade process automatically...
me too...
Title: Re: MariaDB update failed
Post by: intramanga on December 01, 2020, 11:09:15 AM
Here is the solution I found:

First step to save your database (I didn't do it!)

Code: [Select]
mysqldump --all-databases > /home/fullbackup.sql.gz
Uninstall MariaDB client:

Code: [Select]
yum remove MariaDB-server MariaDB-client -y
Now install MariaDB, it will automatically install MariaDB 10.2 (10.2.36):

Code: [Select]
yum install MariaDB-server MariaDB-client -y
Then to finish:

Code: [Select]
mysql_upgrade

well , this worked fine for me .. thanks ..  ;)
Title: Re: MariaDB update failed
Post by: ehstbr on December 01, 2020, 12:29:55 PM
Below the steps that I made...

1. Create a backup file.
Code: [Select]
mysqldump --all-databases > /home/fullbackup.sql.gz
2. Disable InnoDB fast shutdown
Code: [Select]
mysql

mysql -> SET GLOBAL innodb_fast_shutdown = 0;

3. Stop MariaDB
Code: [Select]
service mysql stop
4. Manually uninstall MariaDB 10.1
Code: [Select]
yum remove MariaDB-server MariaDB-client -y
5. Manually install MariaDB 10.2
Code: [Select]
yum install MariaDB-server MariaDB-client -y
6. Start MariaDB
Code: [Select]
service mysql start
7. Upgrade the DB to compatibility
Code: [Select]
mysql_upgrade
8. Enable service "mariadb.service" on "Services config -> Start-up Services".
Code: [Select]
systemctl enable mariadb.service
9. Reboot to check if all right.
Code: [Select]
reboot
If everything all right, relax and drink a coffee. If not, breath and drink a coffee to find a fix, but stay calm... you have a backup (Do you made the 1st step, right?).
Title: Re: MariaDB update failed
Post by: anandmys on December 02, 2020, 04:05:17 AM
I'll wait for a CWP official solution, probably a script update to do the upgrade process automatically...

I will also love this.

I also have the same issue in all my 3 VPS.

Atleast waiting for an official guide to fix this.
Title: Re: MariaDB update failed
Post by: lmilani on December 02, 2020, 11:20:12 AM
same problem here

This is a brief description of the upgrade process.  Important details
can be found in the MariaDB manual, in the Upgrading section.
******************************************************************
error: %pre(MariaDB-server-10.2.36-1.el7.centos.x86_64) scriptlet failed, exit status 1
  Verifying  : MariaDB-server-10.1.48-1.el7.centos.x86_64                   1/2
  Verifying  : MariaDB-server-10.2.36-1.el7.centos.x86_64                   2/2

Failed:
  MariaDB-server.x86_64 0:10.1.48-1.el7.centos                                 
  MariaDB-server.x86_64 0:10.2.36-1.el7.centos                                 

Complete!
Title: Re: MariaDB update failed
Post by: SubZero5 on December 02, 2020, 04:56:37 PM
I did this and fixed my issue:

Code: [Select]
mysqldump --all-databases > /root/fullbackup.sql.gz
Code: [Select]
yum remove MariaDB-server MariaDB-client -y
Code: [Select]
yum install MariaDB-server MariaDB-client -y
Code: [Select]
mysql_upgrade
Code: [Select]
systemctl enable mariadb.service
This finished in like 1 minute or so...

And for cleanup
Code: [Select]
rm /root/fullbackup.sql.gz
Title: Re: MariaDB update failed
Post by: ehstbr on December 02, 2020, 08:18:19 PM
It's highly recommended set innodb_fast_shutdown to 0 and manually stop the mariadb.service before remove current version and install the new version...
Title: Re: MariaDB update failed
Post by: kalybg on December 05, 2020, 12:21:30 PM
I have the same problem ....

Code: [Select]
This is a brief description of the upgrade process.  Important details
can be found in the MariaDB manual, in the Upgrading section.
******************************************************************
error: %pre(MariaDB-server-10.2.36-1.el7.centos.x86_64) scriptlet failed, exit status 1
  Verifying  : MariaDB-server-10.1.48-1.el7.centos.x86_64                   1/2
  Verifying  : MariaDB-server-10.2.36-1.el7.centos.x86_64                   2/2

Failed:
  MariaDB-server.x86_64 0:10.1.48-1.el7.centos                                 
  MariaDB-server.x86_64 0:10.2.36-1.el7.centos                                 

Complete!

Complete!
?????
Title: Re: MariaDB update failed
Post by: herman1506 on December 07, 2020, 06:13:05 AM
Below the steps that I made...

1. Create a backup file.
Code: [Select]
mysqldump --all-databases > /home/fullbackup.sql.gz
2. Disable InnoDB fast shutdown
Code: [Select]
mysql

mysql -> SET GLOBAL innodb_fast_shutdown = 0;

3. Stop MariaDB
Code: [Select]
service mysql stop
4. Manually uninstall MariaDB 10.1
Code: [Select]
yum remove MariaDB-server MariaDB-client -y
5. Manually install MariaDB 10.2
Code: [Select]
yum install MariaDB-server MariaDB-client -y
6. Start MariaDB
Code: [Select]
service mysql start
7. Upgrade the DB to compatibility
Code: [Select]
mysql_upgrade
8. Enable service "mariadb.service" on "Services config -> Start-up Services".
Code: [Select]
systemctl enable mariadb.service
9. Reboot to check if all right.
Code: [Select]
reboot
If everything all right, relax and drink a coffee. If not, breath and drink a coffee to find a fix, but stay calm... you have a backup (Do you made the 1st step, right?).

Works for me.
Thank You!
Title: Re: MariaDB update failed
Post by: ~Q~ on December 10, 2020, 08:48:46 PM
@sandeep

I followed your how to on how to upgrade MariaDB following this instruction set: https://forum.centos-webpanel.com/index.php?topic=9471.msg33152#msg33152

It worked, thanks for the support you give it is the best IMHO

Now I have this issue in CWP admin (using CWPpro) in the  services status panel it displays "MySQL Database Server" = failed

"The status log reads:  InnoDB: Unable to lock ./ibdata1 error: 11
[Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files."

How does one go about clearing this up?

Running on CentOS 7.5

Title: Re: MariaDB update failed
Post by: Igor S. on December 10, 2020, 08:49:57 PM
Hi, I do not think somebody can help you on the forum. There are too many reasons and the problem must be checked by a system administrator.
Title: Re: MariaDB update failed
Post by: Starburst on December 11, 2020, 05:07:18 AM
Ref.: https://www.mysterydata.com/update-upgrade-to-mariadb-10-4-on-vestacp-cwp-centos-7/

Go thru the steps again, make sure NOT to miss one or else it will mess everything up.
Especially Step 2. You want to follow the 2nd step labeled "For MariaDB 10.0/10.1/10.2/10.3 :", and NOT the 1st one.

I've used this guide on multiple servers, never had a problem.
If it still doesn't work. I agree with Igor, you'll have to have CWP support look at it.

CentOS 8 is a little easier, it has 10.4 by default.
You create the repo for 10.5, run dnf update and BAM that's it.
Title: Re: MariaDB update failed
Post by: anandmys on January 13, 2021, 07:28:42 AM
Upgrade successful

But my email smtp giving error when sending email

SMTP 451. Failed to add recipient.

Server configuration problem.

Please help

Here is the solution I found:

First step to save your database (I didn't do it!)

Code: [Select]
mysqldump --all-databases > /home/fullbackup.sql.gz
Uninstall MariaDB client:

Code: [Select]
yum remove MariaDB-server MariaDB-client -y
Now install MariaDB, it will automatically install MariaDB 10.2 (10.2.36):

Code: [Select]
yum install MariaDB-server MariaDB-client -y
Then to finish:

Code: [Select]
mysql_upgrade