MySQL 5.7至MariaDB 10.6升级失败(CentOS 7)



我知道最近MariaDB回购似乎出现了问题,在从MySQL迁移到MariaDB的升级阶段,它返回了404 Not Found错误。

我一直在寻找不同的解决方案,尽管我遇到了一些问题,我想知道是否有人能为我提供建议?

我试图在/etc/yum.repos.d/-中更新我的repo配置文件中的baseurl路径。然而,在保存我在根用户级别所做的更改后,在运行";升级MySQL/MariaDB数据库";WHM的选项。

我尝试通过使用相关的yum --add-repo命令添加额外的repo,该命令已成功添加并启用MariaDB 10.6 repo。然而,当我尝试从WHM重新运行升级时,升级过程一直在搜索10.2版本,并尝试下载以尝试从原始baseurl下载MariaDB(它一直被默认为坏的repo url(

我只是想知道是否有人能与我分享任何关于如何让升级过程识别我为10.6添加的第二个回购(使用工作镜像url(的建议,而不是升级过程自动识别损坏的MariaDB 10.2回购。

只是一个简短的旁注

我曾尝试禁用10.2的默认回购,但在运行升级过程后,10.2包再次自动重新启用。

控制台日志的输出:

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

非常感谢!:-(

经过一整天的努力,我终于找到了一个将MySQL 5.7升级到MariaDB 10.6的解决方案(这也适用于任何想要升级到早期版本MariaDB的人(

请记住,此答案针对的是那些在CentOS7上使用WHM/cPanel的用户。

工作环境

  1. 打开SSH并导航到/etc/yum.repos.d/

  2. 复制默认的MariaDB102.repo文件(并重复此文件5次,确保每个文件都反映版本2及以上的MariaDB的每个版本,例如MariaDB102-new.repo、MariaDB103-new.repo、MariaDB104-new.repo、MariaDB105.repo,最后是MariaDB106.repo

  3. 将默认MariaDB102.repo的原始内容复制到您创建的所有新的5个文件中,确保您更改每个文件中第二行的名称,以反映corrosponding版本,例如name = MariaDB104

(确保在第一行,对于方括号中编辑的每个文件,它都保持为[MariaDB102](假设MariaDB102是服务器上的默认repo。(

  1. 接下来将每个文件中的baseurl更改为以下存档链接:https://archive.mariadb.org/mariadb-10.2/yum/centos7-amd64

(确保更改链接中的版本号以反映MariaDB.的corrosponding版本

  1. 通过运行以下命令yum-config-manager --enable MariaDB10*(确保将末尾的星号更改为版本号,并重复此步骤,直到所有repo都已启用。

  2. 运行yum clean all

  3. 运行yum makecache

  4. 从WHM重新运行升级MySQL/MariaDB,如果正确遵循了上面的所有说明,升级应该会成功!

(请记住,如果您只想升级到特定版本的MariaDB,请不要创建MariaDB106-new.repo文件,如果您想升级到MariaDB 10.5(举个例子(

希望这至少能帮助到别人!:-(

我最终到达了那里!

只对102进行了排序,其余部分自行排序。但我刚刚升级到10.3。

谢谢你的帮助。。。我们为Cpanel支付了大量资金,但仍需在stackoverflow解决这些问题。。。

最新更新