1

我正在尝试设置一个可以从 IP(192.168.1.100~192.168.1.255)访问 mysql 的远程 mysql 用户。

我尝试了以下命令:

GRANT select ON *.* TO 'uname'@'192.168.1.%'  IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

问题是它也允许从 192.168.1.1 到 192.168.1.99 的 IP。

所以我尝试了这个:

GRANT select ON *.* TO 'uname'@'192.168.1.100/25'  IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

结果相同。有什么建议吗?

非常感谢!

4

1 回答 1

2
GRANT select ON . TO 'uname'@'192.168.1.1__' IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
GRANT select ON . TO 'uname'@'192.168.1.2__' IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
于 2012-08-03T04:54:31.823 回答