ubuntu mysql遠程訪問
在ubuntu7.10中mysql安裝,默認是只能本機訪問的,需要打開用戶權限和mysql的本機綁定1、在命令行底下打開用戶權限:grant all privileges on drupal.* to user@192.168.1.80 identified by 'user-password';
在管理員界面可以通過用戶管理add host->any host來添加訪問權限(root用戶默認只能訪問本機,新添加的用戶可遠程)
2、取消mysql本機綁定:
編輯/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重啟即可遠程訪問
linkfrom:http://hi.baidu.com/iminger/blog/item/19e0c9139a052bd4f7039e50.html
posted on 2008-04-27 08:01 狼愛上貍 閱讀(3328) 評論(1) 編輯 收藏 所屬分類: MYSQL