MySQL相关

授权某个IP远程访问MySQL服务器:
1,命令行登录MySQL
> mysql -u root -p
2,授权远程访问
> grant all privileges on *.* to 'root'@'192.168.4.30' identified by '123456';
3,刷新
> flush privileges;

授权所有IP都可以访问
grant all privileges on *.* to 'root'@'%' identified by '123456';

相关推荐