how to use same database for two domains?

Please support our MySQL advertiser: 50% off 6 Months Dedicated Server Hosting from 1&1!
Reply

Join Date: Mar 2008
Posts: 1
Reputation: john777 is an unknown quantity at this point 
Solved Threads: 0
john777 john777 is offline Offline
Newbie Poster

how to use same database for two domains?

 
0
  #1
Mar 28th, 2008
Dear programers,
i am new to mysql and webhosting.

i have one website script,i want to instal the same script to my two domain

names(for example: domain1.com and domain2.com)

i dont want to add this two domain like addon domain.
i have two different hosting for this two domains.

for domain1 i have instal the script,during the installation the script asked

the followingi have filled the same below)

Host:Local host
Database name:xxx
User name:YYY
Password:ZZZ

the domain1 is working fine.

for domain2 i like to use the domain1 database(xxx)(it is in diff hosting)
1)i want to know how to use the same database for diff domains?

2)pls help me to fill the following for domain2,
Host:
Database name:
User name:
Password:

Regards,
john
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 223
Reputation: mwasif is an unknown quantity at this point 
Solved Threads: 34
mwasif mwasif is offline Offline
Posting Whiz in Training

Re: how to use same database for two domains?

 
0
  #2
Mar 28th, 2008
In order to work, you need to allow the mysql username (and your host also must allow this) to connect from remote machine. In host, you need to provide the IP or the domain name e.g. domain1.com and rest of the parameters will remain same as you provided before.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 60
Reputation: RoryGren is an unknown quantity at this point 
Solved Threads: 8
RoryGren's Avatar
RoryGren RoryGren is offline Offline
Junior Poster in Training

Re: how to use same database for two domains?

 
0
  #3
Mar 28th, 2008
There shouldn't be a problem there. Use the same connection details for both domains.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,521
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 520
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: how to use same database for two domains?

 
0
  #4
Mar 30th, 2008
Originally Posted by RoryGren View Post
There shouldn't be a problem there. Use the same connection details for both domains.
Wrong, because DB
Originally Posted by john777 View Post
for domain2 i like to use the domain1 database(xxx)(it is in diff hosting)
John, you need to ask your provider (from the one with DB) if databases is enabled for external access.
If not ask if it is posible, many providers do it, many refuse it as they do not knnow how
Once external access enabled your provider should also give you details how to connect to DB, can be IP or URL string
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 1170 | Replies: 3
Thread Tools Search this Thread



Tag cloud for MySQL
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC