Installing wordpress on OS X error establishing connection

I am really confused by the wordpress installation. The wp_config file has the root username and password for my instance of mysql (localhost) and I have created a blank database called ‘wordpress’ (I am not sure whether I am supposed to have a database created to begin with).

When I go to http://localhost/wordpress/ I get an 'Error establishing a database connection' message. Am I suppose to have a database called ‘wordpress’ to begin with?

Read More

These are my credentials from the config file:

// ** 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', 'friday');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

Related posts

Leave a Reply

2 comments

  1. With WordPress you should have a database setup already (no tables, just the database).

    So the first option should be the database name. If you’re on shared hosting there might be a prefix before the database name.

    Then the user of the database (which should be set up when setting up the database).

    Then the password of that user.

    Then, finally, the host is usually localhost, but if you’re on shared hosting it could be different. You’d have to check your hosting providers docs to be sure.

    Also, the first place you should go to is: http://localhost/wordpress/wp-admin/install.php