参考地址:https://blog.csdn.net/weixin_43454365/article/details/120886434
rpm -ivh mysql-community-common-8.0.27-1.el7.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-libs-8.0.27-1.el7.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-client-8.0.27-1.el7.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-server-8.0.27-1.el7.x86_64.rpm --nodeps --force
使用以下命令,设置远程访问授权:
create user 'root'@'%' identified with mysql_native_password by 'Root@777';
grant all privileges on *.* to 'root'@'%' with grant option;
flush privileges;
执行完毕后,exit退出mysql;
使用如下命令操作mysql8:
systemctl restart mysqld.service
systemctl start mysqld.service
systemctl stop mysqld.service
安装mysql8.0
https://www.cnblogs.com/yunian139/p/13468465.html
防火墙
第一步:开启firewall3306端口防火墙
firewall-cmd --zone=public--list-ports 查看所有打开的端口
firewall-cmd --zone=public--add-port=80/tcp --permanent 开启一个端口,添加--permanent永久生效,没有此参数重启后失效
firewall-cmd --permanent --add-port=80/tcp 开放端口80
firewall-cmd --permanent --remove-port=80/tcp 移除端口80
firewall-cmd --reload 重启防火墙,修改后重启防火墙生效
配置JAVA_home /JRE_home
linux 如何配置环境变量?