Centos7下安装mysql5.7.17
mysql的安装(root用户下)
wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.17-1.el7.x86_64.rpm-bundle.tar
tar -xvf mysql-5.7.17-1.el7.x86_64.rpm-bundle.tar
安装时候会提示与已经安装的RPM包有冲突,所以我们先卸载一些RPM包,要卸载哪些呢?我们要卸载的是包含有mariadb关键字的RPM包,执行命令:rpm -qa|grep mariadb来查看一下我们要卸载哪些软件
rpm -qa | grep mariadb
rpm -e --nodeps mariadb-libs-5.5.50-1.el7_2.x86_64
rpm -ivh mysql-community-common-5.7.17-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.17-1.el7.x86_64.rpm
libnuma.so.1()(64bit) is needed by mysql
yum install numactl
rpm -ivh mysql-community-server-5.7.17-1.el7.x86_64.rpm
mysqld --initialize --user=mysql
systemctl start mysqld
cat /var/log/mysqld.log
[Note] A temporary password is generated for root@localhost: gaYwAX?!k5nw
mysql -uroot -p
systemctl enable mysqld.service
service mysqld status
service mysqld stop
service mysqld start
grant all privileges on *.* to 'root'@'%' identified by 'pwd12345';
flush privileges;