• Hi,

    I’ve seen this error pop up a number of times on the forums however none of the proposed solutions have helped, so here I am….

    I am running Mac OSX 10.6.2 with fresh installs (not upgrades) of:
    – MySQL 5.1.42 (via socket)
    – PHP 5.3.0
    – WordPress 2.9

    PHP is confirmed as working as is MySQL and can connect to the DB through test PHP scripts using the details in the wp-config.php file. However when I attempt to install WordPress I am consistently presented with “Error establishing a database connection”.

    One interesting point is that in connecting to the DB through test scripts, it was only possible when specifying the host as “127.0.0.1:3306”. “localhost” and “localhost:3306” would not work.

    I’ve installed a number of WP systems on macs over the last couple of years, although never with this level of complication.

    Any suggestions appreciated

Viewing 2 replies - 1 through 2 (of 2 total)
  • It sounds like your MySQL setup may not be accepting connections properly.

    First thing to check would be the bind_address entry in your my.cnf file. That should be the IP address of your server.

    Second would be to check the user table in the MySQL install. You need to have a user with permissions to connect from anywhere (%) to the WordPress tables.

    Thread Starter 0z0ned

    (@0z0ned)

    Many thanks. Thought along the lines of your suggestion and found this article:

    All solved

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

The topic ‘Error establishing a database connection’ is closed to new replies.