MYSQL数据库如何赋予远程某个IP访问权限
1. 授权用户root使用密码root从任意主机连接到mysql服务器:
代码如下:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
flush privileges;
2.授权用户root使用密码root从指定ip为218.12.50.60的主机连接到mysql服务器:
代码如下:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'47.94.15.114' IDENTIFIED BY 'root' WITH GRANT OPTION;
flush privileges;