mysql允许远程连接
一、修改/etc/mysql/my.conf
找到bind-address = 127.0.0.1这一行 改为bind-address = 0.0.0.0即可
二、为需要远程登录的用户赋予权限
1、新建用户远程连接mysql数据库 grant all on *.* to ‘%‘ identified by ‘123456‘ with grant option; flush privileges; 允许任何ip地址(%表示允许任何ip地址)的电脑用admin帐户和密码(123456)来访问这个mysql server。 注意admin账户不一定要存在。 2、支持root用户允许远程连接mysql数据库 grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘root‘ with grant option; flush privileges;
相关推荐
lpfvip00 2020-10-07
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