Support » Fixing WordPress » Database connection error

  • Hi,
    I have hosted my wordpress blog on bigrock. It was running smoothly but now it is showing a message as ‘error establishing a database connection’ i have not made any changes in the config file.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi Bhushan11, if everything has been running smoothly and then suddenly stopped, I would suspect that your web host is having a problem with their database server. I recommend contacting them first. After you can rule out the fact that your web host is not having a problem with MySQL, then we can take a stab at looking at WordPress itself to see what may be going wrong.

    If SQL is running fine, go in and run a repair of the database via phpMyAdmin.

    Hi Bhushan11, were you able to make any progress on the database connection issue? Keep us updated, as if Ipstenu’s nor my own suggestion helped, there may be some other troubleshooting steps we can take.

    Bhushan11, have you tried to connect to the database using a normal php connection string?

    <?php
    $link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
    if (!$link) {
        die('Could not connect: ' . mysql_error());
    }
    echo 'Connected successfully';
    mysql_close($link);
    ?>

    change database information and if u received any error, contact your host.

    Thanks a lot guys..!! just coz it suddenly disappeared i got panicked :).. Brad’s suggestion worked out and i found there was a problem with the web host. Thanks again, all your support is appreciated!! 🙂

    Glad to hear it is resolved Bhushan11!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Database connection error’ is closed to new replies.