Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress How to Build a WordPress Theme Content Strategy with WordPress Installing and Setting Up WordPress Locally

Snezana Cubrilovic
Snezana Cubrilovic
6,879 Points

Error establishing a database connection

I'm trying to install Wordpress on PC, but after submitting Database Name, User Name, Password ... like in video, I get : Error establishing a database connection "This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. This could mean your host's database server is down.

ā†’
Are you sure you have the correct username and password?
ā†’
Are you sure that you have typed the correct hostname?
ā†’
Are you sure that the database server is running?

" pass and user is root and server is running. Can't figure it out what is wrong.

2 Answers

Chris Shaw
Chris Shaw
26,676 Points

Hi Snezana,

MAMP is been used in the video which uses root as the password by default for the MySQL server while depending on which stack you install on Windows the password will simply be blank, if you know the stack has a password you can usually find it on the software developers site.

shareyourpeace
shareyourpeace
3,244 Points

@chris Upjohn I just posted a similar question. In the video there is no mention that we should use root when we creat the database and user from phpMyAdmin. Can you please look at my post. Thanks.