简体   繁体   中英

MySQL 5.7 to MariaDB 10.6 Upgrade Failing (CentOS 7)

I know that it appears that there has been an issue surrounding the MariaDB repo's as of recent times, which has been returning a 404 Not Found error during the upgrade stage of migrating from MySQL to MariaDB.

I've been fishing around for different workarounds, although, I am stuck with a few issues which I was wondering if anyone may be able to advise on?

I've tried to update the baseurl path within my repo config file within /etc/yum.repos.d/ - However, after the saving the changes I made at a root user level, the original baseurl is replaced automatically after running the the "Upgrade MySQL/MariaDB database" option from WHM.

I've tried adding in an additional repo through using the relevant yum --add-repo command which has added and enabled the MariaDB 10.6 repo successfully. However, when I attempt to rerun the upgrade from WHM, the upgrade process keeps searching for the 10.2 version and attempts to download to try and download MariaDB from the original baseurl (Which keeps getting defaulted back to a broken repo url)

I was just wondering if anyone could share with me any pointers on how to get the upgrade process to recognise the second repo I added for 10.6 (With a working mirror url) as oppose to the upgrade process automatically identifying the broken MariaDB 10.2 repo.

Just a quick side note

I have tried disabling the default repo for 10.2, however once again, after running the upgrade process, the 10.2 package is automatically re-enabled.

Output of the console log:

Restarting mysql service.
(XID ehvnfq) The “mysql” service is disabled.
The system was not able to ensure the availability of the “MariaDB-client” package: (XID httqu8) “/usr/bin/yum” reported error code “1” when it ended: https://yum.mariadb.org/10.2/centos7-amd64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.



One of the configured repositories failed (MariaDB102),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).

3. Run the command with the repository temporarily disabled
yum --disablerepo=MariaDB102 ...

4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:

yum-config-manager --disable MariaDB102
or
subscription-manager repos --disable=MariaDB102

5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:

yum-config-manager --save --setopt=MariaDB102.skip_if_unavailable=true

failure: repodata/repomd.xml from MariaDB102: [Errno 256] No more mirrors to try.
https://yum.mariadb.org/10.2/centos7-amd64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found

Many thanks: :-)

After spending a full day banging my head against the wall and gradually getting closer towards getting a result, I've finally created a workaround for upgrading MySQL 5.7 to MariaDB 10.6 (This will also work for anyone who's wanting to upgrade to an earlier version of MariaDB)

Please keep in mind, this answer is aimed towards those using WHM/cPanel on CentOS 7.

WORKAROUND

  1. Open up SSH and navigate to /etc/yum.repos.d/

  2. Copy the default MariaDB102.repo file (And duplicate this file 5 times ensuring that each file reflects each version of MariaDB from version 2 and upwards eg MariaDB102-new.repo, MariaDB103-new.repo, MariaDB104-new.repo, MariaDB105.repo and finally MariaDB106.repo

  3. Copy the original contents of the default MariaDB102.repo, in to all of the new 5 files you have created ensuring that you change the second line within each file where it says name to reflect the corrosponding version eg name = MariaDB104

(Ensure that on the first line, for each file you edit that in the square brackets, it remains as [MariaDB102] (Assuming MariaDB102 is the default repo on your server.)

  1. Next change the baseurl within each file to the following archive link: https://archive.mariadb.org/mariadb-10.2/yum/centos7-amd64

(Ensure to change the version number in the link to reflect the corrosponding version of MariaDB.

  1. Ensure all the files you have created are set to enabled by running the following command yum-config-manager --enable MariaDB10* (Ensure to change the asterisk at the end to the version number and repeat this step until all the repo's have been enabled.

  2. Run yum clean all

  3. Run yum makecache

  4. Rerun the Upgrade MySQL/MariaDB from WHM and if all the instructions have been followed correctly above, the upgrade should provision successfully!

(Please keep in mind, if you are only wanting to upgrade to a specific version of MariaDB, don't create the MariaDB106-new.repo file, if you are wanting to upgrade to MariaDB 10.5 (Just as an example)

Hope this helps someone at least: :-)

I got there in the end!

Just did for the 102 and the rest sorted itself. But I was just upgrading to 10.3.

Thanks for the help... we pay tons of money for Cpanel but still have to sort these issues in stackoverflow...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM