开发者

How to make Php application running on Xampp to connect to a remote mysql db?

I have a php application running on XAMPP but I want to connect to a mysql db running on a remote machine(which is also using XAMPP). The application works fine 开发者_开发技巧when I connect to the mysqldb instance on my machine. I have changed the configuration files to point to the remote db and have given the correct credentials as well. But I get access denied error.


"Access denied" means you're at least connecting to the remote MySQL instance. Most like you've got a mismatch on the credentials. You may have granted permissions to "user@somehost" on the remote MySQL, but if that machine can't resolve "somehost" via DNS or a Hosts file lookup, it'll have to fall back to checking for a "user@ip.add.re.ss" account.


First I would check the remote database owner / host to make sure they allow external access. Most hosts, especially shared hosting providers, only allow access to scripts run locally and do not allow external access like you are describing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜