RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting

show content from another sites's database

Join Date: Jan 2007
Posts: 58
Reputation: crazynp is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
crazynp crazynp is offline Offline
Junior Poster in Training

Re: show content from another sites's database

  #4  
Feb 12th, 2007
Originally Posted by Rhyan View Post
Are the 3 websites hosted on the same server?

If the 3 websites are not stored on the same server, then the server where the mysql database is should allow connections from the internet, not only localhost requests.

If the sites are hosted on a public webserver, I doubt that the server would allow access from the internet, as it is potentially unsafe.

Still, if you can perform grants, you can configure a read-only access to the database for a user, explicitly allowing access from the IP of the website that needs to acces the database. It seems confusing, so I will explain like this:

1. website 1 holds the database.
2. website 2 needs access to the database of website 1 from ip 1.2.3.4 .

Create a user named e.g. web2 with pass web2 in the database server.
Grant to user web2 SELECT on DATABASE.* from host with ip 1.2.3.4.

open port in firewall at website1 server for access to the database server normally on port 3306 for mysql.

it should work this way.

If you need any info check resources available on mysql.com or check the hosting server help and faq manuals and sections on how to allow access, grant permissions, etc.


Thanks Rhyan,

Again a little question

Can I do this if I have got only access to the cpanel of the website or do I need access to the WHM or where Can I configure that and if I can do that with cpanel how to do that?
Last edited by crazynp : Feb 12th, 2007 at 12:18 pm.
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:37 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC