WordPress.org

Ready to get started?Download WordPress

Forums

Error establishing a database connection (9 posts)

  1. megdov
    Member
    Posted 1 year ago #

    I am working on a school assignment that involves WordPress. I am trying to manually install it on my site on a subdomain, but I get this message when attempting to go to megendonovanmedia.com/icm507/wordpress and http://megendonovanmedia.com/icm507/wordpress/wp-admin/install.php (please excuse the long URLs):

    "Error establishing a database connection"

    I have "localhost" where it should be in the configuration file (and I'm 100% sure my database name, user and password are correct):

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    I use Bluehost.com -- should I use something else?

  2. lettergrade
    Member
    Posted 1 year ago #

    'localhost' should be correct. Have you tried using the Bluehost automatic install option instead? They have an auto-installer in their cpanel which takes a few of the steps out of it.

  3. ajmcfadyen
    Member
    Posted 1 year ago #

    does your table-prefix match?

    If you go through cPanel, then to phpMyAdmin you can see all the WordPress tables... often prefixed with wp_

    so if your wp-config.php declares the prefix as mydb_ instead of wp_ that could cause problems.

  4. rohitsahu
    Member
    Posted 1 year ago #

    I have a problem in installation error in local machine:
    Error establishing a database connection

  5. megdov
    Member
    Posted 1 year ago #

    Thanks! I assumed I had to do it all manually but after further inspection, my prof is ok w/ doing the auto-installer -- that seemed to fix everything! Thanks for the feedback lettergrade & ajmcfayden!

  6. lettergrade
    Member
    Posted 1 year ago #

    Awesome, glad everything is moving for you!

  7. formulas
    Member
    Posted 1 year ago #

    Now what... Frank

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    @formulas: It is impolite to interrupt another poster's ongoing thread with a question of your own. It causes significant problems for the forum's volunteers and prevents us from being able to track issues by topic. Please post your own topic.

  9. Phillip Flores
    Member
    Posted 1 year ago #

    This might be a bit late but BlueHost's database name is usually prefixed by your account name e.g. pcfpress_wor1 which you need to specify in the config.php file.

Topic Closed

This topic has been closed to new replies.

About this Topic