mysql开启远程登录访问

来源:互联网 发布:学编程的app 编辑:程序博客网 时间:2024/04/29 12:16
A ip:192.168.0.100B ip:192.168.0.101希望从B连接到A怎么办?在A上,创建用户grant all privileges on *.* to 'username'@'192.168.0.101' identified by 'password';在B上 mysql -h192.168.0.100 -P3306 -uusername -ppassword连接成功如果希望从任何一台主机都能连接A,则创建用户语句改为grant all privileges on *.* to 'username'@'%' identified by 'password';
原创粉丝点击