我可以使用以下代码轻松地授予对一个IP的访问权限:
$ mysql -u root -p
Enter password:
mysql> use mysql
mysql> GRANT ALL ON *.* to root@'192.168.1.4' IDENTIFIED BY 'your-root-password';
mysql> FLUSH PRIVILEGES;但我需要允许整个子网192.168.1.*远程访问数据库。
我该怎么做呢?
发布于 2020-01-09 19:54:19
当您连接到服务器并想要连接到您的主机后,您应该执行以下步骤:
GRANT ALL ON . to root@'write_your_ip_addres' IDENTIFIED BY 'write_password_to_connect';nano /etc/mysql/my.cnf folder= 127.0.0.1
保存my.cnf文件夹with control +X
https://stackoverflow.com/questions/11742963
复制相似问题