Multiple sites with one database

Discussion in 'MySQL' started by Mr.Bill, Feb 13, 2008.

  1. #1
    I have 3 site that all have a newsletter subscription and 3 databases is it possible to have one database instead of 3? All three are on the same server and IP ie
    siteone.com
    sitetwo.com
    sitethree.com

    This way I dont have to manually update all the databases. All the script does is allow for a email address to be inputed and checks to see if it's been submitted once.

    Is this difficult to do
     
    Mr.Bill, Feb 13, 2008 IP
  2. The Critic

    The Critic Peon

    Messages:
    392
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Not at all. Just use the same database connection strings for all three sites.
     
    The Critic, Feb 13, 2008 IP
  3. Mr.Bill

    Mr.Bill Well-Known Member

    Messages:
    2,818
    Likes Received:
    134
    Best Answers:
    0
    Trophy Points:
    160
    #3
    Do you know what that would be for MySql

    Something like this?
     
    Mr.Bill, Feb 13, 2008 IP
  4. LittleJonSupportSite

    LittleJonSupportSite Peon

    Messages:
    386
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #4

    If all three db's contain different data be sure to merge the data into one DB and then use a single connection string for all three sites.
     
    LittleJonSupportSite, Feb 13, 2008 IP
  5. Mr.Bill

    Mr.Bill Well-Known Member

    Messages:
    2,818
    Likes Received:
    134
    Best Answers:
    0
    Trophy Points:
    160
    #5
    All three sites will use the exact same script and database. All that is in the database is there email and unsubscribe code. If someone could walk me through this step by step with actual code I will pay for your time.
     
    Mr.Bill, Feb 13, 2008 IP