Setting up SQL what do I need to put as local host?

Discussion in 'Databases' started by smivers.com, Feb 14, 2010.

  1. #1
    I have a website which is on a hostgator package which allows me to add domains, I have added a doamin to the account, but obviously its like a sub domain name. I can not figure out what the local host would be when it comes to entering it for the install of my website. I have the usernames and passwords and database name. would it be e.g subdomain.localhost.com?

    Please help asap.
     
    smivers.com, Feb 14, 2010 IP
  2. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #2
    The DB server should be localhost whether it is the primary, addon or subdomain.
     
    Colbyt, Feb 14, 2010 IP
  3. scole

    scole Peon

    Messages:
    104
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That would depend on your host.

    With my Hostgator account it is always just "localhost". Nothing more or less. NO need to enter the domain or anything. Just "localhost" will do. I would suspect that this is the same for any host that uses cpanel.

    With my 1and1 account however it's different. Whenever I create a new mysql database I am giving a host url to use. It's different for every database created.

    Shannon
     
    scole, Feb 14, 2010 IP
  4. smivers.com

    smivers.com Peon

    Messages:
    560
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Well I am trying to setup dartingdirect.com, would someone be willing to do the install for me? I have the sql databases setup already.

    Regards
     
    smivers.com, Feb 15, 2010 IP
  5. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #5
    If your script does not make use of an installer, all you need to do is open the config file and enter hostname, database,user, and password.
    localhost
    accountname_dbname (cPanel appends your account name to the DB name to make each DB unique)
    account_name_username (same as above)
    password

    Note the account name is whatever your master account name is with HG.

    You can view the full DB and usename from your control panel. If you failed to copy the password you will need to create a new user and copy it this time.

    If you allow cPanel to create the password sometimes, for some stupid reason it will include invalid characters which will fail to work. Any 6 digit alpha numeric combo is all the security you need.
     
    Colbyt, Feb 15, 2010 IP
  6. smivers.com

    smivers.com Peon

    Messages:
    560
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I have entered my own password and it will still not work, could you please take a look, I have sent the details to you.
     
    smivers.com, Feb 15, 2010 IP
  7. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #7
    Done and the install is complete.
     
    Colbyt, Feb 15, 2010 IP