SQLSTATE[HY000] [1130] Host '139.129.142.19' is not allowed to connect to this MySQL server 的解决办法
来源:互联网 发布:索尼卖大楼知乎 编辑:程序博客网 时间:2024/06/08 02:48
先描述一下问题:就是做好的网站放到在阿里买的主机后,其他页面的问题没有了。但是出现了链接数据库出错的问题,【SQLSTATE[HY000] [1130] Host '139.129.142.19' is not allowed to connect to this MySQL server】
然后,我就百度说给用户权限,
grant 权限 on 数据库对象 to 用户
一、grant 普通数据用户,查询、插入、更新、删除 数据库中所有表数据的权利。
grant select on testdb.* to common_user@'%'grant insert on testdb.* to common_user@'%'grant update on testdb.* to common_user@'%'grant delete on testdb.* to common_user@'%'
1. grant 作用在整个 MySQL 服务器上:
grant select on *.* to dba@localhost; -- dba 可以查询 MySQL 中所有数据库中的表。grant all on *.* to dba@localhost; -- dba 可以管理 MySQL 中的所有数据库
查看当前用户(自己)权限:
show grants;
查看其他 MySQL 用户权限:
show grants for dba@localhost;撤销已经赋予给 MySQL 用户权限的权限。
revoke 跟 grant 的语法差不多,只需要把关键字 “to” 换成 “from” 即可:
grant all on *.* to dba@localhost;revoke all on *.* from dba@localhost;
MySQL grant、revoke 用户权限注意事项
1. grant, revoke 用户权限后,该用户只有重新连接 MySQL 数据库,权限才能生效。
2. 如果想让授权的用户,也可以将这些权限 grant 给其他用户,需要选项 “grant option“
grant select on testdb.* to dba@localhost with grant option;这个特性一般用不到。实际中,数据库权限最好由 DBA 来统一管理。
但是这些都没有解决问题,后来我就提交了工单:然后一下子就明白了 :DB_Host填写的是数据库地址,您的数据库地址/数据库名/用户名都可以到主机管理控制台查看下,并不是IP地址
阅读全文
0 0
- SQLSTATE[HY000] [1130] Host '139.129.142.19' is not allowed to connect to this MySQL server 的解决办法
- SQLSTATE[HY000] [1130] Host 'DESKTOP-O0CRH8F' is not allowed to connect to this MySQL server
- ERROR 1130 (HY000): Host 'xxxxxx' is not allowed to connect to this MySQL server解决办法
- SQLSTATE[HY000] [1130] Host '127.0.0.1' is not allowed to connect to this MySQL server怎么解决?
- mysql远程连接:ERROR 1130 (HY000): Host '*.*.*.*' is not allowed to connect to this MySQL server解决办法
- mysql远程连接:ERROR 1130 (HY000): Host '*.*.*.*' is not allowed to connect to this MySQL server解决办法
- mysql远程连接:ERROR 1130 (HY000): Host '*.*.*.*' is not allowed to connect to this MySQL server解决办法
- 解决MySQL ERROR 1130 (HY000): Host 'XXX' is not allowed to connect to this MySQL server
- 解决MySQL ERROR 1130 (HY000): Host 'XXXX' is not allowed to connect to this MySQL server
- ERROR 1130 (HY000): Host 'localhost' is not allowed to connect to this MySQL server
- ERROR 1130 (HY000): Host 'localhost' is not allowed to connect to this MySQL server
- 解决ERROR 1130 (HY000): Host '192.168.1.9' is not allowed to connect to this MySQL server
- ERROR 1130 (HY000): Host '192.168.225.128' is not allowed to connect to this MySQL server
- ERROR 1130 (HY000): Host '10.117.1.13' is not allowed to connect to this MySQL server
- ERROR 1130 (HY000): Host '172.16.0.123' is not allowed to connect to this MySQL server
- ERROR 1130 (HY000): Host '113.57.150.82' is not allowed to connect to this MySQL server
- ERROR 1130 (HY000): Host 'localhost' is not allowed to connect to this MySQL server
- ERROR 1130 (HY000): Host 'xxx' is not allowed to connect to this MySQL server
- Android中获取View的宽/高的时机
- 求二进制中1的个数扩展至n进制
- 第一章课后习题
- java内部类重点记录
- 微信公众号支付开发总结
- SQLSTATE[HY000] [1130] Host '139.129.142.19' is not allowed to connect to this MySQL server 的解决办法
- MIPS64寄存器与指令集
- Android USB HID bulkTransfer()参数解析
- 【贪心+数学分析】51Nod1350[斐波那契表示]题解
- 欢迎使用CSDN-markdown编辑器
- unity学习——事件机制(观察者模式)
- 奋斗群群赛11---筚路蓝缕
- jdk安装https证书
- kafka