安装源
rpm -ivh https://dev.mysql.com/get/mysql80-community-release-el7-5.noarch.rpm
安装MySQL 服务器
尝试运行:yum -y install mysql-community-server
如果报错 Unable to find a match: mysql-community-server
运行:yum module disable mysql
再执行:yum -y install mysql-community-server
启动 systemctl start mysqld
重启 systemctl restart mysqld
高版本mysql不支持初始无密码进入,所以打开日志文件查看随机生成的密码
cat /var/log/mysqld.log | grep password
输入密码后进入mysql
强制要求修改密码
alter user 'root'@'localhost' identified by 'daBa123126@';
保存操作
flush privileges;
文章评论