Error establishing a database connection: XAMPP WordPress

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Error establishing a database connection: XAMPP WordPress

Postby sgollor » 22. February 2017 23:49

Good day Everyone,

Please I'd be delighted if I can get some help with this. There's a lot of documentation on this but my troubleshooting has failed. Im sorry if this is a repetition. I installed XAMPP for windows which works fine but it is not working for my MAC OS Sierra.

My XAMPP version is 5.6.30-0
My servers are running.

This is my wp-config.php details:

Code: Select all
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', ‘WP’);

/** MySQL database username */
define('DB_USER', ‘admin’);

/** MySQL database password */
define('DB_PASSWORD', ‘darkall’);

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


The user "admin" is a new user I created just for the "WP" database in phpMyAdmin.

I tried to go to http://localhost/wp/ but get the error "Error establishing a database connection""

I've also tried adding images to this post but I cannot get my head around it just yet, hopefully with time.

I want to keep this short for now but I will give more information as it may be required.

Thank you very much.

Regards

Samuel
sgollor
 
Posts: 2
Joined: 22. February 2017 23:05
XAMPP version: 5.6.30-0
Operating System: Mac OS Sierra Version 10.12.3

Re: Error establishing a database connection: XAMPP WordPres

Postby sgollor » 23. February 2017 10:39

The issue has been fixed.

I replaced curly quoted with single quotes. This is the new config.php file.

Code: Select all
/** MySQL database username */
define('DB_USER', 'admin');

/** MySQL database password */
define('DB_PASSWORD', 'darkall');

/** 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', '');
sgollor
 
Posts: 2
Joined: 22. February 2017 23:05
XAMPP version: 5.6.30-0
Operating System: Mac OS Sierra Version 10.12.3


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 2 guests