MySQL DB Error connecting on localhost [Resolved]

I am setting up a CentS linode with litespeed, php + myql. After creating database, user and giving permissions I configred wordpress wp-config.php.

Now when I run install I get following error:

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.

When I use ssh I am able to login to DB using same credentials as wp-config. I checked everything and created new DB giving permissions but no luck

Help please…

4 Replies

how are you logging in?

What permissions are you granting to the database user?

Interesting I found the solution on WP.

wp-config "localhost" needs to be "Localhost" (capital L) that resolved the problem :)

If that fixed your problem, there's something very strange about your linode. My WP config has this line:

define('DB_HOST', 'localhost');

It works fine.

does your /etc/hosts file have a captial 'L' for localhost?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct