Add-On domain issue

Discussion in 'MySQL' started by BBS, Jan 5, 2010.

  1. #1
    I have an add-on domain that I am hosting a script on that requires a MySQL database.

    I have set up the DB, user and permission (obviously on the primary domain) but am having issues with configuring the script.

    For clarity we will call my primary domain www.domain.com and the add-on domain www.addon.com.

    If I configure the script so the URL is www.addon.com and the server is 'localhost' it's not locating the DB.

    If I configure the script so the URL is www.addon.com and the server is "www.domain.com" it's still not locating the DB.

    I even tried the script so the URL is addon.domain.com and the server is "localhost" and that didn't work.....

    I'm now lost - can anyone offer me some guidance please???
     
    Last edited: Jan 5, 2010
    BBS, Jan 5, 2010 IP
  2. mjewel

    mjewel Prominent Member

    Messages:
    6,693
    Likes Received:
    514
    Best Answers:
    0
    Trophy Points:
    360
    #2
    Contact your host. They may have permissions set that requires an ip address or are blocking remote connections.
     
    mjewel, Jan 5, 2010 IP
  3. BBS

    BBS Guest

    Messages:
    175
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your comment, this is my server - however I am no expert as you can probably tell.

    Can you guide me on confguration.
     
    BBS, Jan 5, 2010 IP
  4. basia

    basia Well-Known Member

    Messages:
    263
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    155
    #4
    The domain name makes no difference for the database connection. The database connection is established using the server, database name, user name and password. The server should be set to localhost since it's running on the same server as the website. I would check if your script is using the correct database name.
     
    basia, Jan 6, 2010 IP
  5. Dondon2d

    Dondon2d Peon

    Messages:
    3,193
    Likes Received:
    146
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Localhost should work, since they're on the same server (and mySQL is on same path). I can help you set it up, just PM me cPanel info.
     
    Dondon2d, Jan 6, 2010 IP