• Hi, I am using Linux based Plesk 8.6 & want to install WordPress 3.0.1 on it.
    I have followed below steps to install the WordPress:
    -> created a fresh new domain under the Linux base Plesk 8.6.
    -> downloaded the latest WordPress release 3.0.1 & extracted it on my local machine.
    -> created a MySQL database & its user.
    -> uploaded the extracted WordPress files to the “httpdocs” folder of the domain via FTP.
    -> ran the installation script by accessing http://mydomain.com/wp-admin/install.php
    -> since I haven’t set up the wp-config.php file by myself, while running the installation, it asked to create by itself.
    -> I provided the db_name, db_user, db_password, db_host, etc & submit the form.

    After submitting the above form, I got the error message showing “Error establishing a database connection”.

    I checked all the db info many times, they were correct. But still I was not able to complete installing the WordPress on my Linux Plesk 8.6.

    So, I need your help to properly install the WordPress on Linux Plesk 8.6, please advise.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Short answer: The username and password and db hostname. One of more of them is wrong.

    Simple as that, really. I know you said they’re not, but… There’s no other error condition that can cause that. Something is wrong there.

    Alternatively:
    – Your database isn’t running
    – Your server is blocked from connecting to it
    – Something else

    But the only WordPress thing that can go wrong is one of those three being incorrect. Every other cause is server related.

    Thread Starter spanchal

    (@spanchal)

    Its very obvious that one or more of username, password, db hostname may have been wrong…but I know that I have used the correct ones for all db related values. I have tried checking the db values many times, still I am getting this error.

    I have also checked that the database is running by checking the PhpMyAdmin.

    So, I am still at the same situation, still waiting for any other answer, which can solve this error.

    Same thing has happened with me right now,except I installed WordPress a month back. Very strange

    Me too! Just updated ubuntu-server this morning and got the “Error establishing db connection” message.

    I verified all the wp-config variables (I can even connect to mysql over SSH with the same credentials) but nothing is working.

    My wordpress install was working fine until the upgrade. (I’m running WP 3.0.1 and Ubuntu-Server 9.10) Any help resolving this issue would be much appreciated.
    UPDATE

    Found something interesting. I’m serving my wordpress site from a ubuntu-server 9.10 box btw.

    I restarted mysql:

    sudo /etc/init.d/mysql restart

    and got an error in the check for corrupt, not cleanly closed tables:

    ERROR 144 (HY000) at line 1: Table './MyWordPress_db/wp_options' is marked as crashed and last (automatic?) repair failed

    Hopefully, this is it. I’ll post fix when I can find it.

    Poked around on the net for a way to fix table. Did it and it worked!

    First I had to locate the corrupt table. After that, executed this:

    sudo myisamchk -r /var/lib/mysql/MyWordPress_db/wp_options

    Then I restarted mysql and voila!

    Sweet success. Hope this helps somebody else who’s problem with the “Error Establishing DB connection” is less trivial than 3 variables in the wp-config file.

    Sweet success indeed! I tried your method and it worked, thank you very much!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error establishing a database connection’ is closed to new replies.