美文网首页
mysql设置指定IP范围访问

mysql设置指定IP范围访问

作者: scoot929 | 来源:发表于2018-09-11 10:57 被阅读11次

    mysql设置只能指定范围IP访问

    grant all privileges on *.* to root@"192.168.1.0/255.255.255.0" identified by '12345678' with grant option;
    FLUSH PRIVILEGES;
    
    ip地址例子:
    192.0.0.0/255.0.0.0(192 A类网络的任何地址)
    192.168.0.0/255.255.0.0(192.168 A类网络的任何地址)
    192.168.1.0/255.255.255.0(192.168.1 C类网络的任何地址)
    192.168.1.1(只有该IP)

    相关文章

      网友评论

          本文标题:mysql设置指定IP范围访问

          本文链接:https://www.haomeiwen.com/subject/oxgygftx.html