mysql默认禁止非本机访问
授权方式:署名,非商业用途,保持一致,转载时请务必以超链接(http://www.fwolf.com/blog/post/192)的形式标明文章原始出处和作者信息及本声明。由于DBDesigner不好用,mysql的workbench还在beta,看了一眼也只是“初级阶段”,又换回了windows下的powerdesigner,好在我有两台电脑。
但是,默认却无法从windows主机连接到ubuntu下的mysql,错误:
Can’t connect to MySQL server on ‘192.168.10.18′ (10061)
原来,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
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
就是只监听本机地址。所以,如果要开放局域网内的访问,需要注释掉这一句,或者改成:
bind-address = 0.0.0.0
另外,netstat -ant命令用来查看本机当前监听端口真的不错。
No tags for this post.
Save to Browser Favorites
Ask
backflip
blinklist
BlogBookmark
Bloglines
BlogMarks
Blogsvine
BUMPzee!
CiteULike
co.mments
Connotea
del.icio.us
DotNetKicks
Digg
diigo
dropjack.com
dzone
Facebook
Fark
Faves
Feed Me Links
Friendsite
folkd.com
Furl
Google
Hugg
Jeqq
Kaboodle
linkaGoGo
LinksMarker
Ma.gnolia
Mister Wong
Mixx
MySpace
MyWeb
Netvouz
Newsvine
PlugIM
popcurrent
Propeller
Reddit
Rojo
Segnalo
Shoutwire
Simpy
sk*rt
Slashdot
Sphere
Sphinn
Spurl.net
Squidoo
StumbleUpon
Technorati
ThisNext
Webride
Windows Live
Yahoo!
Email This to a Friend
If you like this then please subscribe to the
March 7th, 2007 at 19:00:49
谢谢分享。
[Reply]