Support » Installing WordPress » Error – database connection – Host Name

  • I have no idea how to get my host name. It keeps coming up as an error, so I am sure that is the problem. I tried going to my CPanel and looking in the MySQL section, but it says the host name is (which is my hosts website). I tried this, but it didn’t work. The “localhost” didn’t work either. I’m not sure how to get it, I tried looking through the installation, but it said it would give me a php code thing. It didn’t. I don’t know what to do.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Moderator James Huff


    Volunteer Moderator

    Try following this guide:

    Check with your host for what to put in there. Did you use Fantastico or install yourself?

    In cPanel on the DB admin interface when you add the user to the database it will give you 2 connection strings: one for Peral, one for PHP. Look at the second one – everything should be there.

    I used what my server provided. It doesn’t give me any code at all. I don’t think I have Perl on my server. It’s all so confusing.

    Did you read the guide from the link above that macmanx gave you?
    Did you look at the images there? Go back again and take a look at the section titled “Connection Information”…
    If you don’t see that on your database management cPanel page – it means you didn’t add the user to the DB.

    None of the pictures match up to what I have on my CPanel.

    Don’t get lost in details. Your cPanel might have a different skin/theme, the colours might be different etc. but that information is the same.
    Find a link (button) named “MySQL Databases” and clicking on it will take you to the next page where the connection string are displayed.
    Again: if you did NOT add the user to the database, you won’t see it. Question: Did you add the user to the database???

    I did add a user to the database. There isn’t a link that says that. Only links that take you to the databases I have created. When you click on one of those, it says:
    Host Name:
    Port number (says a number)
    Database name: angela_wordpress
    phpMyAdmin Built in phpMyAdmin control panel
    you will need a properly configured dba user to log in (just add user with dba role if you don’t have one)
    Quota Used 0.0 MB out of 25 MB
    Database users: (my username is here)

    Quote 1: I did add a user to the database
    Quote 2: you will need a properly configured dba user to log in (just add user with dba role if you don’t have one)

    Don’t you sense any contradiction here…?
    The user is NOT added to the DB.

    Database users: angela_wordpress
    I added that user to the database already..and I can login to PHP MyAdmin with that username. I think it’s the host name…I’ll try a new user thing though to see if your right.

    Create a user (angela_wordpress) and to ADD to the database are 2 different operations. Well, that’s an overstatement… the second one is a click when you see the DB and the user in the proper fields, you click below on the add user button. Note: the fact that you see them in the same line does NOT mean the user was added.

    Alright..I tried a new user..and I specifically picked the “Dba” roll in this drop down menu and clicked “grant”. but it still isn’t working.

    I didn’t say grant. I sad “ADD user to db”.

    Database users :angela_angela, angela_wordpress
    I granted for both. I looked for an add..or anything else that might do the same thing..but grant is the only thing I can do. It clearly says that I have those two users for the database…I’m starting to give up on this..but thanks so much for trying to help =) It’s appreciated.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Error – database connection – Host Name’ is closed to new replies.