CentOS7下安装MySQL

1.下载mysql的linux安装包

2.将下载的二进制压缩包放到/usr/local/mysql目录下。(mysql需手动创建)

3.解压下载的zip包,

tar -xvf   MySQL-5.6.38-1.el7.x86_64.rpm-bundle.tar  

解压后有以下几个rpm包:

MySQL-client-advanced-5.6.38-1.el7.x86_64.rpm

MySQL-devel-advanced-5.6.38-1.el7.x86_64.rpm

MySQL-embedded-advanced-5.6.38-1.el7.x86_64.rpm

MySQL-server-advanced-5.6.38-1.el7.x86_64.rpm

MySQL-shared-advanced-5.6.38-1.el7.x86_64.rpm

MySQL-shared-compat-advanced-5.6.38-1.el7.x86_64.rpm

MySQL-test-advanced-5.6.38-1.el7.x86_64.rpm

3. 卸载MariaDB

查看当前安装的mariadb包:

[root@bogon 桌面]# rpm -qa | grep mariadb

将它们统统强制性卸载掉:

[root@bogon 桌面]# rpm -e --nodeps mariadb-libs-5.5.35-3.el7.x86_64

[root@bogon 桌面]# rpm -e --nodeps mariadb-5.5.35-3.el7.x86_64

[root@bogon 桌面]# rpm -e --nodeps mariadb-server-5.5.35-3.el7.x86_64

4.安装MySQL-client-advanced-5.6.38-1.el7.x86_64.rpm

 

 

安装perl后再次执行

5.安装 MySQL-devel-5.6.38-1.el7.x86_64.rpm

rpm -ivh  MySQL-devel-5.6.38-1.el7.x86_64.rpm

6.安装MySQL-server-5.6.38-1.el7.x86_64.rpm

 rpm -ivh MySQL-server-5.6.38-1.el7.x86_64.rpm

安装net-tools,再次安装

 

posted @ 2018-01-03 15:04  stone9159  阅读(187)  评论(0编辑  收藏  举报