centos8.2安装mysql_centos8安装mysql

https://jingyan.baidu.com/article/8cdccae9bdef64705413cdd6.html

mysql8创建远程登录用户:

mysql,进入mysql

1.create user root@'%' identified  by 'root';      #创建远程登录用户及密码

2.grant all privileges on *.* to root@'%' with grant option;   #给远程登录用户赋值所有权限

3.ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';   #mysql8使用的是caching_sha2_password加密规则,最简单的方法是修改远程连接用户的加密规则为mysql_native_password

4.flush privileges;   #刷新一下,使配置生效

1.show global variables like 'port';   #查看数据库启用端口

1.检查远程服务器的防火墙:

systemctl start firewalld # 开启防火墙

systemctl stop firewalld  # 关闭防火墙

systemctl status firewalld  #检查防火墙状态

2.如果防火墙开启,就将3306端口加入到防火墙中:

查看防火墙开放的端口命令:firewall-cmd --list-ports

向防火墙中添加端口,例如添加3306端口名利如下:

firewall-cmd --permanent --zone=public --add-port=3306/tcp

开启已经配置好的jenkins的端口,然后在重启防火墙,注意一定要重启防火墙,命令如下:

systemctl reload firewalld

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值