• mrhanover

    (@mrhanover)


    I need help… I know i filled in the sql info correctly onto the wp-config.php file which i had to edit with notepad and fill in the pass and user and db host thing. However every time i keep trying to install wordpress onto 000webhost i keep getting the error establishing a database connection. I have literally spent 3-5hours trying to fix this stupid error and it has been driving me nuts! I am using the latest update of wp…I NEED to get this error fixed…Any suggestions? I would gladly love to know…(also this will give me the option “plugins” in my admin panel on wordpress.com right?…cuz it didnt show up on a normal blog site i made earlier)

    $mysql_host = “mysql6.000webhost.com”;
    $mysql_database = “a1234567_something”;
    $mysql_user = “a1234567_something123”;
    $mysql_password = “mypass”;

Viewing 2 replies - 1 through 2 (of 2 total)
  • fonglh

    (@fonglh)

    (also this will give me the option “plugins” in my admin panel on wordpress.com right?…cuz it didnt show up on a normal blog site i made earlier)

    No it won’t. Your WordPress.com site has nothing to do with your self hosted WordPress install.

    gaurabmani

    (@gaurabmani)

    Hi mrhanover Are you sure you added the database user “a1234567_something123” to the database “a1234567_something”.

    If not then added the user to the database you want to add, also
    make a separate file connect.php and copy and paste the below code upload and browse the file and check if any error flashes out.

    It is to check if your database connection is running fine.

    ******************************************************
    <?php
    $link = mysql_connect(‘localhost’, ‘a1234567_something123’, ‘mysql_password’);
    if (!$link) {
    die(‘Not connected : ‘ . mysql_error());
    }

    // make foo the current db
    $db_selected = mysql_select_db(‘foo’, $link);
    if (!$db_selected) {
    die (‘Can\’t use foo : ‘ . mysql_error());
    }
    ?>
    *******************************************************

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error Establishing A Database Connection’ is closed to new replies.