Solved :Error establishing a database connection

Many times I saw this message. “Error establishing a database connection”. That time I did not understand why this message is coming.

When started working on WordPress blog Plugins, Themes. Then I got to know about this error.
Whenever you mis-configured the wp-config.php file. You will this kind of error.

You need to Fill following information correctly:(dont forget to create database your own)
** 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’);

This will solve your problem.

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.