|
|
原来,mysql的默认配置为了增强安全性,禁止了非本机的访问,在ubuntu中是这样,debian中也是。禁止的方式以前是在my.cnf中有一句
skip-network
现在则变成了:
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
就是只监听本机地址。所以,如果要开放局域网内的访问,需要注释掉这一句,或者改成:
bind-address = 0.0.0.0
我注释了bind-address = 0.0.0.0 这行,并restart了mysql进程,但是在windows下还是联接不上3306呀,头大的很
telnet 192.168.2.11 3306
EHost '192.168.2.10' is not allowed to connect to this MySQL server
Connection to host lost.
C:\Documents and Settings\x> |
|