centos7安装mysql5.6
CentOS7 上安装mysql5.6 (最好切换到root下操作!) CentOS7将默认数据库由mysql替换为Mariadb,因此需要先卸载Mariadb。方法为: [root@gerrit+gitlab ~]# rpm -qa|grep mariadb mariadb-libs-5.5.60-1.el7_5.x86_64 [root@gerrit+gitlab ~]# rpm -e --nodeps mariadb-libs-5.5.60-1.el7_5.x86_64 删除my.conf:(如果存在的话) [root@gerrit+gitlab ~]# rm /etc/my.cnf 创建mysql用户组: [root@gerrit+gitlab ~]# groupadd mysql 创建mysql用户并加入用户组: [root@gerrit+gitlab ~]# useradd -g mysql mysql 下载安装包: 从 https://dev.mysql.com/downloads/mysql/5.6.html#downloads下载mysql-5.6.42-linux-glibc2.12-x86_64.tar.gz,适配操作系统选择Linux - Generic (glibc 2.12) (x86, 64-bit), Compressed TAR