WordPress.org

Forums

Error establishing a database connection (8 posts)

  1. jfmxl
    Member
    Posted 4 years ago #

    'Error establishing a database connection' is what I get on attempted installation.

    I have made a mysql user wpadmin
    I have made a database wp
    I have given wpdamin all privileges on wp
    My database is up and running

    I used phpmyadmin to create wp and wpadmin and to grant privileges.
    I used 'PASSWORD' as the encryption type for the password assigned to wpadmin.

    What do you think is wrong?

  2. govpatel
    Member
    Posted 4 years ago #

    What does your host use cpanel if so you create database from Database wizard icon not on phpmyadmin.

    phpmyadmin is program to manage your database.

  3. Tara
    Volunteer Moderator
    Posted 4 years ago #

    An error connecting to your database is common, but it isn't necessarily a problem with wordpress itself.

    -First, double check your wp-config.php file settings for the database name, database username and database password. This is where most errors occur.

    -Then check that you don't need to change the database host from "localhost" to something else.

    -Check you have actually created a database with the same database name as is in your wp-config.php file.

    -Last, but not least, if all that information is correct your database probably has a problem with it and you may need to contact your web hosting.

    There are also many threads on this topic on these forums: http://wordpress.org/search/Error+establishing+a+database+connection?forums=1

  4. jfmxl
    Member
    Posted 4 years ago #

    No cpanel.

    The wpadmin user I've created is a database user, no?

    Or are you telling me that I have to create a system user wpadmin in order to run wordpress?

  5. jfmxl
    Member
    Posted 4 years ago #

    I've checked all the obvious things you've mentioned.

    I've deleted the db/user pair and recreated as wordpress/wordpress

    mysql -u wpordpress -p

    gives

    ERROR 1045 (28000): Access denied for user 'wordpress'@'localhost' (using password: YES)

    Maybe it's phpmyadmin's sql?

    What sql do you use to create the db/user pair?

    Thanks.

  6. Tara
    Volunteer Moderator
    Posted 4 years ago #

    -Last, but not least, if all that information is correct your database probably has a problem with it and you may need to contact your web hosting.

    have you contacted your hosting provider?

  7. jfmxl
    Member
    Posted 4 years ago #

    I fixed it. I just used an existing user account with appropriate permissions to populate the database. Something was wrong with the user account being created by phpmyadmin... the user I had created had no global permissions, but full permissions over the relevant database. Perhaps that was the problem? Whatever, as they say. It works now.

    http;//www.robinlea.com/wordpress

    I do notice a place for a picture in the user profile... but no way to upload an actual picture to fill it? Is that right?

    Thanks for all your help.

  8. esmi
    Forum Moderator
    Posted 4 years ago #

    Please post a new topic.

Topic Closed

This topic has been closed to new replies.

About this Topic