Reply
Is this possible (mysql from another host question)
Old 03-08-2007, 12:19 AM Is this possible (mysql from another host question)
Skilled Talker

Posts: 86
Name: Aaric
I am doing a site for a friend using his host, his host allows php but no mysql databases. I wanted to use my news adding script I set up (which I currently have on my host and stores news in a database on my host) to add news to his site. Is it possible to have his site on his host, pull information from the mySQL database on mine?
aaricwon is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 03-08-2007, 12:48 AM Re: Is this possible (mysql from another host question)
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,025
Name: Forrest Croce
Location: Seattle, WA
Sure. There's some kind of security system, but probably just a user account and password in the database engine. With credentials, it will let anybody in, whether that's software running on the same box or in a different machine.

This is the first thing you do when a big site needs to scale - put the database server on one box and the web server on another.
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 03-08-2007, 03:39 AM Re: Is this possible (mysql from another host question)
OmuCuSucu's Avatar
Vi Veri Veniversum Vivus

Posts: 1,167
Name: Dragos-Valentin
Location: Cluj-Napoca, RO
mysql can be set to allow access from other host or just from the same box. look into that a bit
__________________
.
» Please remember to add to my Talkupation if you enjoyed my post. Thank you :)
.
OmuCuSucu is offline
Reply With Quote
View Public Profile
 
Old 03-09-2007, 01:37 AM Re: Is this possible (mysql from another host question)
mtishetsky's Avatar
Super Spam Talker

Posts: 880
Location: Volendam, Netherlands
This trick can only be done if your host allows mysql connections from outside and if your friend's host has php configured with mysql support. If both conditions are satisfied go to your mysql admin and add someuser@yourfriends.host, give him privileges to access his database or tables, then try to connect from your friend's host to your mysql using that credentials.
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 03-09-2007, 01:41 AM Re: Is this possible (mysql from another host question)
mtishetsky's Avatar
Super Spam Talker

Posts: 880
Location: Volendam, Netherlands
Quote:
Originally Posted by ForrestCroce View Post
Sure. There's some kind of security system, but probably just a user account and password in the database engine. With credentials, it will let anybody in, whether that's software running on the same box or in a different machine.

This is the first thing you do when a big site needs to scale - put the database server on one box and the web server on another.
You know, the standard mysql feature allows to use file sockets for interaction between server and client (in *nix machenis only) and thus not only increase performance but also prevent listening on tcp port at all. Most shared hostings use this feature, so it becomes the matter not only of user and password to connect from remote server.
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Reply     « Reply to Is this possible (mysql from another host question)
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13524 seconds with 13 queries