一、环境安装包下载
- CentOS7镜像下载地址:
链接: http://isoredirect.centos.org/centos/7/isos/x86_64/ - MySQL5.7下载地址:https://downloads.mysql.com/archives/community/
二、部署环境
- 安装CentOS7
- 上传MySQL5.7安装包到CentOS下(不要放在/root下,可以放在/usr或/opt等下)
三、卸载CentOS7系统自带的数据库
- 查看系统自带的Mariadb
rpm -qa|grep mariadb
- 卸载系统自带的Mariadb
rpm -e --nodeps mariadb······
- 查看系统自带的Mariadb是否卸载
rpm -qa|grep mariadb
此时再执行查询就没有这个数据库了
4. 删除etc目录下的my.cnf
rm /etc/my.cnf
四、检查系统是否存在MySQL用户组,没有就创建
- 检查mysql 用户组是否存在
cat /etc/group | grep mysql
cat /etc/passwd |grep mysql
以上命令无输出代表没有