Apache + Connect to remote MySQL database (online)

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Apache + Connect to remote MySQL database (online)

Postby Philo » 09. August 2011 17:12

Hi!

I'm trying to connect to a remote mysql database.
But It can't seem to reach it.

So I'm running Apache local, and I want to connect to a remote server for example: google.com

Somehow this is being blocked.
When I use my Mac with Mamp and try the same it seems to work fine.

Anyone has experience getting this working?

Thanks!
Philo
 
Posts: 7
Joined: 28. October 2005 15:12

Re: Apache + Connect to remote MySQL database (online)

Postby JonB » 09. August 2011 19:02

That's pretty UNCLEAR Philo

HOW do you want to connect to a remote database???

Using your own PHP code or a script???


Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Apache + Connect to remote MySQL database (online)

Postby Philo » 10. August 2011 09:16

Hi JonB,

I'm using PHP to connect to the remote database.
I've disabled the firewall and anti-virus / internet security.

But somehow it can't seem to reach the remote database.

For example:
mysql_connect('mydomain.com', 'mysql_user', 'mysql_password');

This works on my Mac but not on my Windows machine.
Philo
 
Posts: 7
Joined: 28. October 2005 15:12

Re: Apache + Connect to remote MySQL database (online)

Postby JonB » 10. August 2011 12:04

what's the error you are getting??

:?:
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Apache + Connect to remote MySQL database (online)

Postby Philo » 10. August 2011 13:14

Unable to connect to the database.
I think it is a windows issue though, since I tried with multiple windows webservers.
Philo
 
Posts: 7
Joined: 28. October 2005 15:12

Re: Apache + Connect to remote MySQL database (online)

Postby JonB » 10. August 2011 15:47

OK, however I suspect that's not the case really.

Its probably a firewall or socket method issue. The best place to get advice on this would be a place like Stackoverflow or Daniweb (or the MySQL forums).

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Apache + Connect to remote MySQL database (online)

Postby rashed » 10. August 2011 17:33

Philo wrote:Hi!

I'm trying to connect to a remote mysql database.
But It can't seem to reach it.

So I'm running Apache local, and I want to connect to a remote server for example: google.com

Somehow this is being blocked.
When I use my Mac with Mamp and try the same it seems to work fine.

Anyone has experience getting this working?

Thanks!


Dear Philo,

You can try the following-

step 1:
create a user with anyhost in remote mysql server
e.g. user@*

step 2:

mysql_connect('host:port/opt/lampp/var/mysql/mysql.sock', 'user', 'password');

hope it will connect.

Thanks
rashed
 
Posts: 2
Joined: 10. August 2011 17:05


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 200 guests