mysql修改用户连接权限

北栀
2019-06-18 / 0 评论 / 1,648 阅读 / 正在检测是否收录...

授权任意主机连接:

账号myuser密码password任何主机连接到mysql服务器
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;

指定IP连接:

允许用户myuser从IP为192.168.1.3的主机连接到mysql服务器,并使用password作为密码
GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.1.3' IDENTIFIED BY 'password' WITH GRANT OPTION;
0

评论 (0)

取消