先释放一下!气死我了!!
背景:
在云主机上安装mysql来来回回重装了十几遍,气得我昨晚还把云主机的系统重装了一遍!!!但是并没有解决根本问题。最终还是今天上午解决了!
我安装的mysql是5.6
首先说一下我的错误步骤!记住一下是错误步骤!
1、我是直接通过xshell的文件传输将mysql的rpm包上传到我的云服务器上的。
2.就是因为这一步背一篇博客中的文章误解,导致我安装一天都没安装上去!就是安装mysql之前,要先卸载MariaDB。
但是我用的命令是 # rpm -qa|grep MariaDB
就找到一个安装包。但是好像是我没有搜清楚还是单词中有大写字母。今天使用另一个命令,才把mariadb的残留卸载完。
#rpm -qa|grep -i mariadb
后面就是各种错误,然后就是卸了重装,卸了重装,卸了重装。。。。。
================================================================================================
================================================================================================
终于我找到了解决方案了。
1.直接开始安装:
#rpm -ivh MySQL-server-5.6.34-1.linux_glibc2.5.x86_64.rpm
然后出现下面的错误,各种file。。。。。。。
这个是因为CentOS 7的默认数据库已经不再是MySQL了,而是MariaDB. MySQL安装时的mysql lib库与mariadb的库、包冲突了,如下详情所示(省略了大量日志)
[root@azrlnx06 tmp]# rpm -ivh MySQL-server-advanced-5.6.20-1.rhel5.x86_64.rpm
Preparing... ################################# [100%]
file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-advanced-5.6.20-1.rhel5.x86_64 conflicts with file from package mariadb-libs-1:5.5.50-1.el7_2.x86_64
file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-advanced-5.6.20-1.rhel5.x86_64 conflicts with file from package mariadb-libs-1:5.5.50-1.el7_2.x86_64
file /usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-advanced-5.6.20-1.rhel5.x86_64 conflicts with file from package mariadb-libs-1:5.5.50-1.el7_2.x86_64
file /usr/share/mysql/english/errmsg.sys from install of MySQL-server-advanced-5.6.20-1.rhel5.x86_64 conflicts with file from package mariadb-libs-1:5.5.50-1.el7_2.x86_64
file /usr/share/mysql/estonian/errmsg.sys from install of MySQL-server-advanced-5.6.20-1.rhel5.x86_64 conflicts with file from package mariadb-libs-1:5.5.50-1.el7_2.x86_64
file /usr/share/mysql/french/errmsg.sys from install of MySQL-server-advanced-5.6.20-1.rhel5.x86_64 conflicts with file from package mariadb-libs-1:5.5.50-1.el7_2.x86_64
file /usr/share/mysql/german/errmsg.sys from install of MySQL-server-advanced-5.6.20-1.rhel5.x86_64 conflicts with file from package mariadb-libs-1:5.5.50-1.el7_2.x86_64
file /usr/share/mysql/greek/errmsg.sys from install of MySQL-server-advanced