欧拉22使用rpm包安装mysql8

发布时间 2023-09-09 20:15:04作者: 坚强的小蚂蚁

欧拉系统下载链接
http://mirrors.163.com/openeuler/openEuler-22.03-LTS/everything/x86_64/Packages/


https://zhuanlan.zhihu.com/p/649407349
安装tar命令
dnf -y install tar
解压tar包
tar -xf mysql-community-8.0.33-1.x86_64.tar
setenforce 0

开始安装
rm -rf *test*
rm -rf *devel*
rm -rf *router*
#dnf -y install ./*.rpm
rpm -Uvh --force --nodeps *.rpm

设置开机启动
systemctl enable mysqld
systemctl start mysqld

查看默认密码
grep 'temporary password' /var/log/mysqld.log

重设密码
alter user 'root'@'localhost' identified by 'Gioneco@2021';
flush privileges ;

正式环境密码:ahN7sae_y7Na

修改root用户可外部访问
use mysql
update user set host='%' where user ='root';
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'WITH GRANT OPTION;
FLUSH PRIVILEGES;


https://blog.csdn.net/sjkdlf/article/details/129532558
https://www.cnblogs.com/eljxy/p/16893453.html