ERROR 1130 (HY000): Host '192.168.20.165' is not allowed to connect to this MySQL server
Posted on 2017-12-29 11:52 翔云123456 阅读(224) 评论(0) 编辑 收藏 举报问题
远程连接mysql时遇到如下问题:
ERROR 1130 (HY000): Host '192.168.20.165' is not allowed to connect to this MySQL server
解决
远程登录有权限限制,需要对用户赋权。
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
表示授权某个用户在哪些主机上可以对哪些数据库和表进行哪些操作。
- ON *.* db.table: 数据库和数据表
- TO user: 要授权的用户
- @ host: %’表示任何主机
参考
Just try, don't shy.