Remore connect

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

Remore connect

Postby Anna » 18. July 2006 13:13

My need for remote connection is a little different to the average. I do not want to be able to host a website using xampp, just the database.

I have a website, but whilst my hosting service is great in most areas, database is weak, and can be very slow to access. So, I am hoping that I can use the database that I have set up using xamp on my home box, and have my remote website connect to it.

I understand that most of the details for the configuration are in the httpd config, but all of the documentation refers to the needs of people who wish to have full access to their site, which I do not want.

Quick question. In setting up the httpd config do I put the remote website as the host ? or do I set that, via IP address as the IP to listen on using port 3306 (sql default)? Or do I do both?

If the above is the case, do I then set my remote site to point to localhost for the database connection?

If I am totally off the beam here and wrong, how would I go about setting this so that my remote website can call my machine for its database functions only?

Thanks
Anna
 
Posts: 5
Joined: 17. July 2006 14:25

Postby Wiedmann » 18. July 2006 14:27

I understand that most of the details for the configuration are in the httpd config,

This is the config file from the Webserver (Apache) and have nothing to do with the database (MySQL).

I have a website ... So, I am hoping that I can use the database that I have set up using xamp on my home box,

Then you need an user in MySQL which have access from outside (user@%) and not only from localhost (user@localhost). You can make this with e.g. phpMyAdmin.

If the above is the case, do I then set my remote site to point to localhost for the database connection?

Of course not. "localhost" is in every time the pc where the script is running (the host/server itself where you use this name):
- If you have a script on server a and a db on server a then you make a database connection to "localhost"
- If you have a script on server a and a db on server b then you make a database connection to "ip/hostname of server b"

BTW:
On your home pc you must open your firewall to allow connections to port 3306 and if you have a router you must make a port-mapping for this port. (look into the manual for your router)
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Anna » 19. July 2006 03:27

Thank you for your advice. Greatly appreciated, and very helpful.

Just one further question, so that I am compeltely clear here.

By the term "hostname", what do you mean exactly? Is that the name of the computer housing the database?
Anna
 
Posts: 5
Joined: 17. July 2006 14:25


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 104 guests