【数据库安全】MySql远程访问设置
Mysql远程无法连接
客户端远程连接mysql失败.(mysql server在Ubuntu上)
ip能ping通,telnet ip:3306端口不通 Ubuntu下防火墙已经关闭 sudo ufw disable
Ubuntu ping windwos不通,关闭Windows防火墙后能ping通了
还是连接不上
忘记了MySQL默认禁止#允许所有用户远程访问 修改用户名和密码为你自己的
mysql> GRANT ALL PRIVILEGES ON *.* TO ‘USERNAME‘@‘%‘ IDENTIFIED BY ‘PASSWORD‘ WITH GRANT OPTION; #允许单个ip 修改用户名和密码为你自己的 mysql> GRANT ALL PRIVILEGES ON *.* TO ‘USERNAME‘@‘1.2.3.4‘ IDENTIFIED BY ‘PASSWORD‘ WITH GRANT OPTION; #最后 mysql> FLUSH PRIVILEGES;
# 查看防火墙状态
- service iptables status
# 停止防火墙
- service iptables stop
# 启动防火墙
- service iptables start
相关推荐
emmm00 2020-11-17
王艺强 2020-11-17
aydh 2020-11-12
世樹 2020-11-11
zry 2020-11-11
URML 2020-11-11
spurity 2020-11-10
yifangs 2020-10-13
Andrea0 2020-09-18
Ida 2020-09-16
ltd00 2020-09-12
tufeiax 2020-09-03
xjd0 2020-09-10
greatboylc 2020-09-10
adsadadaddadasda 2020-09-08
疯狂老司机 2020-09-08
CoderToy 2020-11-16
ribavnu 2020-11-16
bianruifeng 2020-11-16