Home >Backend Development >PHP Tutorial > 远程连接数据库 Warning: mysqli:mysqli(): (HY000/1130)

远程连接数据库 Warning: mysqli:mysqli(): (HY000/1130)

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 12:24:342406browse

求助 远程连接数据库 Warning: mysqli::mysqli(): (HY000/1130)
在PHP下运行这句$con= new mysqli('服务器地址:3306','用户名','密码','数据库名');
 提示 Warning: mysqli::mysqli(): (HY000/1130): Host '14.19.199.149' is not allowed to connect to this MySQL server
报错里面的这个IP地址并不是我数据库的IP地址
但是用Navicat for Mysql 却能连接上? 
------解决思路----------------------
 not allowed to connect to this MySQL server 不允许连接到MySQL服务器
远程连接数据库,需要在数据库方做授权!
------解决思路----------------------
授权后试试吧
------解决思路----------------------
到 MYSQL  命令行给你要登录的帐号 允许 远程连接

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn