GRANT ALL PRIVILEGES ON *.* TO '<username>'@'<remote addr or %(for all ip addr)>'IDENTIFIED BY '<password>' WITH GRANT OPTION;
修改mysql的配置檔案
在linux下,mysql的配置檔案是/etc/mysql/my.cnf
修改bind-address為0.0.0.0或者mysql所在機器的IP
重新開機mysql
在遠端通路mysql mysql -h <ip addr> -u <username> -p <password>
http://blog.csdn.net/ldar2011/article/details/42921381