SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Nov 2000
    Posts
    740
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mysql data but from another host

    I have my site hosted with Host A, that only allows one mysql db. But I need another for a script I want to put on that site.

    Can I just use a mysql database that is on another host and link to it via my site with Host A? Any pros or cons if this is possible?

    Thanks,

    Jon

  2. #2
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,014
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    It is possible, the script on Host A would need to establish a separate connection to the database on Host B.

    If the one database per site is the only restriction then another possibility would be to use the same database but with a different name prefix for the tables for the new stuff eg.

    The existing tables would be like xx_table_name and the new tables would be like yy_table_name. They wouldn't necessarily be xx and yy as long as the two are not the same.
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,246
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    and of course you would need to "prefix" your table names in the combined database only if there are any tables with the same name in both source databases

    don't just rename them for the sake of renaming them

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •