• I’m having problem with the error message:

    “Error establishing a database connection”

    On my WordPress (v4.4)-installation when trying to access it from my Mac. The wordpress site works fine on my PC which makes me wonder why its not working on my Mac. I’ve setup Xampp with the htdocs-folder in Google Drive so that my site is accessible from any computer (PC). Now I also want to work with it on from an iMac.

    This is my wp-config.php:

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'wordpress');
    
    /** MySQL database username */
    define('DB_USER', 'root');
    
    /** MySQL database password */
    define('DB_PASSWORD', '');
    
    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    I’ve tried to change DB_HOST to both ‘Localhost’ (results in Parse error: syntax error, unexpected ”); ‘ (T_CONSTANT_ENCAPSED_STRING) ) and to 127.0.0.1 (results in Error establishing…-message)

    I’m able to access my localhost and phpmyadmin from both my PC and Mac, but when entering the wordpress site it all fails on Mac.

  • The topic ‘"Error establishing a database connection" – Mac OSX 10.11’ is closed to new replies.