- 編輯 /etc/mysql/my.cnf,註解 bind-address 設定,或改為 bind-address = 0.0.0.0
#bind-address = 127.0.0.1
- 新增可遠端登入的帳號
mysql> GRANT ALL PRIVILEGES ON 資料庫名稱.* TO 帳號@遠端IP IDENTIFIED BY '密碼';
- 更新權限
mysql> flush privileges;
參考:
http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html
http://serverfault.com/questions/139323/mysql-bind-to-more-than-one-ip-address
http://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_skip-networking
http://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_bind-address
欣賞
回覆刪除