windows服务器下mysql如何禁用外部访问
2015-05-31 TECH localhost mysql windows
之前用惯了*nix下的mysql禁用外部访问直接skip-networking 就好了
但是windows下的mysql服务skip-networking不行,因为windows下的mysql只有三种连接模式:Shared memory(共享内存)、Named pipes(命名管道)、TCP/IP(常用的TCP/IP)
一般情况下我们使用的localhost 或127.0.0.1 或者其他ip形式都是TCP/IP 模式,为了不动代码,所以还是选用了TCP/IP 模式
通过配置选项 bind-address=localhost 限定只允许本地连接 即可。
[mysqld] port=3306 ... # skip-networking # enable-named-pipe bind-address=localhost ...
上一篇: 最近在做的一些事
暂无评论