Posted  21 Nov 2009 - 21:36:27

Category: Apple

Error establishing a database connection wordpress on Mac

When you're trying to set up a Wordpress blog on Mac OS X for example you see the error message "Error establishing a database connection" even though you have double checked the username and password etc in wp-config.php.

Open a terminal and type the following:

  1. cd /etc
  2. sudo cp php.ini.default php.ini
  3. sudo nano php.ini
  4. Change "mysql.default_socket =" to "mysql.default_socket = /tmp/mysql.sock"


© SolutionCottage 2008-2011 9/23/2017 11:50:37 AM