rpm -qa|grep mariadb
rpm -e mariadb-libs-5.5.68-1.el7.x86_64 --nodeps
tar -xvf mysql*.tar
以下加粗rpm包需要安装:
mysql-community-common-5.7.23-1.el7.x86_64.rpm
mysql-community-libs-compat-5.7.23-1.el7.x86_64.rpm
mysql-community-minimal-debuginfo-5.7.23-1.el7.x86_64.rpm
mysql-community-server-5.7.23-1.el7.x86_64.rpm
mysql-community-devel-5.7.23-1.el7.x86_64.rpm
mysql-community-libs-5.7.23-1.el7.x86_64.rpm
mysql-community-client-5.7.23-1.el7.x86_64.rpm
mysql-community-server-minimal-5.7.23-1.el7.x86_64.rpm
mysql-community-test-5.7.23-1.el7.x86_64.rpm
mysql-community-embedded-devel-5.7.23-1.el7.x86_64.rpm
mysql-community-embedded-5.7.23-1.el7.x86_64.rpm
mysql-community-embedded-compat-5.7.23-1.el7.x86_64.rpm
rpm -ivh mysql-community-common-5.7.23-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.23-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.23-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.23-1.el7.x86_64.rpm
执行以server rpm包报错 运行 yum list libaio 安装环境
完成之后就可以顺利安装mysql-community-server-5.7.23-1.el7.x86_64.rpm
rpm -ivh mysql-community-devel-5.7.23-1.el7.x86_64.rpm
systemctl start mysqld
查看初始密码
grep 'temporary password' /var/log/mysqld.log
密码为root@localhost: ?kp*******
mysql -uroot -p #策略要求 set global validate_password_policy=0; #密码长度 set global validate_password_length=4; set password=password('123456'); grant all on *.* to root@'%' identified by '123456' with grant option; flush privileges;
systemctl enable mysqld systemctl daemon-reload
链接 提取:7g3k
上一篇:MySQL 教程 1.2