在ubuntu7.10中mysql安裝,默認(rèn)是只能本機(jī)訪問的,需要打開用戶權(quán)限和mysql的本機(jī)綁定
1、在命令行底下打開用戶權(quán)限:grant all privileges on drupal.* to user@192.168.1.80 identified by 'user-password';
在管理員界面可以通過用戶管理add host->any host來添加訪問權(quán)限(root用戶默認(rèn)只能訪問本機(jī),新添加的用戶可遠(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)程訪問
linkfrom:http://hi.baidu.com/iminger/blog/item/19e0c9139a052bd4f7039e50.html