一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

mysql设置指定ip远程访问连接例子

时间:2022-11-14 23:37:02 编辑:袖梨 来源:一聚教程网

1. 授权用户root使用密码maozhuxi123从任意主机连接到mysql服务器

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'maozhuxi123' WITH GRANT OPTION;
flush privileges;

2.授权用户root使用密码maozhuxi123从指定ip为218.12.50.60的主机连接到mysql服务器

GRANT ALL PRIVILEGES ON *.* TO 'root'@'218.12.50.60' IDENTIFIED BY 'maozhuxi123' WITH GRANT OPTION;
flush privileges;

热门栏目