Page 1 of 1

Using different MySQL server

PostPosted: 14. June 2013 00:54
by lewis
Hi, was hoping someone could help me...

My PHP application connects fine to the XAMPP MySQL server ('localhost', 'root', '').

However I need to connect to a hosted MySQL server, while still running the app through localhost. I'm certain my host/login details are correct but it simply won't connect.

I can connect to it when running the PHP on a production server so I'm sure it must be a XAMPP config problem.

Any help would be hugely appreciated!

Thanks, Lewis

Re: Using different MySQL server

PostPosted: 14. June 2013 04:44
by Altrea
Hi lewis,

MySQL User that are allowed to connect from localhost are not automatically allowed to connect from remote hosts.
In reality you can specify the same username for many different hosts and all of them are unique and can have different permissions.

Ask your database Hoster if remote connections are allowed and possible and which connection parameters you need to connect.

It is not a XAMPP issue.

Best wishes,
Altrea