centos7 mariadb 升级到 10.0

列出所有被安装的rpm package

# rpm -qa | grep mariadb

 

mariadb-libs-5.5.50-1.el7_2.x86_64
mariadb-5.5.50-1.el7_2.x86_64
mariadb-server-5.5.50-1.el7_2.x86_64

 

卸载

# rpm -e mariadb-libs-5.5.50-1.el7_2.x86_64

 

此时报错:

error: Failed dependencies:
    libmysqlclient.so.18()(64bit) is needed by (installed) postfix-2:2.10.1-6.el7.x86_64
    libmysqlclient.so.18()(64bit) is needed by (installed) perl-DBD-MySQL-4.023-5.el7.x86_64
    libmysqlclient.so.18()(64bit) is needed by (installed) php-mysql-5.4.16-36.3.el7_2.x86_64
    libmysqlclient.so.18(libmysqlclient_18)(64bit) is needed by (installed) postfix-2:2.10.1-6.el7.x86_64
    libmysqlclient.so.18(libmysqlclient_18)(64bit) is needed by (installed) perl-DBD-MySQL-4.023-5.el7.x86_64
    libmysqlclient.so.18(libmysqlclient_18)(64bit) is needed by (installed) php-mysql-5.4.16-36.3.el7_2.x86_64
    mariadb-libs(x86-64) = 1:5.5.50-1.el7_2 is needed by (installed) mariadb-1:5.5.50-1.el7_2.x86_64
    mariadb-libs(x86-64) = 1:5.5.50-1.el7_2 is needed by (installed) mariadb-server-1:5.5.50-1.el7_2.x86_64

 

强制卸载,因为没有–nodeps

# rpm -e --nodeps mariadb-libs-5.5.50-1.el7_2.x86_64

# rpm -e --nodeps mariadb-5.5.50-1.el7_2.x86_64

# rpm -e --nodeps mariadb-server-5.5.50-1.el7_2.x86_64 

 

然后可以安装mariadb 10了。

MaraiDB安装配置


MariaDB的安装可以直接添加更新官方的源,到/etc/yum.repos.d下创建MariaDB.repo

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

 

保存后更新源

yum update

安装最新MariaDB

yum install mariadb mariadb-server

添加开机启动

systemctl enable mariadb

开启

systemctl start mariadb

在服务开启的状态下,设置最新密码

mysql_secure_installation

 

vim /etc/yum.repos.d/mariadb.repo

写入以下内容:
国内源

# MariaDB 10.2 CentOS repository list - created 2017-07-03 06:59 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = https://mirrors.ustc.edu.cn/mariadb/yum/10.2/centos7-amd64
gpgkey=https://mirrors.ustc.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1


参考链接:http://mirrors.ustc.edu.cn/help/mariadb.html

以上是中国科学技术大学的 mariadb yum源,下载起来非常快,如果直接官网下载,非常的慢,非常的慢,因为这软件加依赖包,都有167M !!!

相关推荐

magento backend dashboard can’t log in – session error

可能很多朋友有同样的经历,magento在服务器中配置域名是可以正常的访问了,但是在本地配置后却无法登录后台,账号密码登录的时候发现出现空白,无法跳转到后台,本文章向大家介绍两种解决本地magento后台无法登录的方法,需要的朋友可以参考下

暂无评论

发表评论

微信扫一扫,分享到朋友圈

centos7 mariadb 升级到 10.0