欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

mariadb版本升级

程序员文章站 2022-03-22 15:57:27
...

将Mariadb 5.*升级到10.2.9,官方源下载慢,改为国内镜像源

1、停止原服务 

systemctl stop mariadb

 2、增加mariadb安装源 

touch /etc/yum.repos.d/MariaDB.repo
vim /etc/yum.repos.d/MariaDB.repo
添加内容
[mariadb]  
name = MariaDB 
baseurl = http://mirrors.tuna.tsinghua.edu.cn/mariadb/mariadb-10.2.9/yum/centos7-amd64/
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB 
gpgcheck=1

 3、卸载旧版本 

yum remove mariadb-server mariadb mariadb-lib
yum clean all

 4、安装Mariadb 

yum install MariaDB-server MariaDB-client

 5、启动服务

systemctl start mysql.service

 6、验证

mysql -uroot -p

 Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 21

Server version: 10.2.9-MariaDB MariaDB Server

 

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.