mysql ERROR 1042 (00000): Can't get hostname for your address 问题的解决。

远程连接本地数据库时碰到的问题。
问题:mysql ERROR 1042 (00000): Can't get hostname for your address
解决:
1. 找到:mysql安装目录下面:my.ini
2. 添加如下语句 skip-name-resolve (添加地点不限,建议添加在最后)
3. 重启mysql



格式:grant 权限 on 数据库名.表名 用户@登录主机 identified by "用户密码";
mysql> grant all privileges on *.* to 'root'@'%' identified by '' with grant option;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)