ubuntu mysql遠(yuǎn)程訪問(wèn)
在ubuntu7.10中mysql安裝,默認(rèn)是只能本機(jī)訪問(wèn)的,需要打開(kāi)用戶(hù)權(quán)限和mysql的本機(jī)綁定1、在命令行底下打開(kāi)用戶(hù)權(quán)限:grant all privileges on drupal.* to user@192.168.1.80 identified by 'user-password';
在管理員界面可以通過(guò)用戶(hù)管理add host->any host來(lái)添加訪問(wèn)權(quán)限(root用戶(hù)默認(rèn)只能訪問(wèn)本機(jī),新添加的用戶(hù)可遠(yuǎn)程)
2、取消mysql本機(jī)綁定:
編輯/etc/mysql/my.cnf
# 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 = 127.0.0.1“注釋
sudo /etc/init.d/mysql restart重啟即可遠(yuǎn)程訪問(wèn)
linkfrom:http://hi.baidu.com/iminger/blog/item/19e0c9139a052bd4f7039e50.html
posted on 2008-04-27 08:01 狼愛(ài)上貍 閱讀(3328) 評(píng)論(1) 編輯 收藏 所屬分類(lèi): MYSQL