Wordpress can't access mySQL

Linode Staff

Hello,

I have MySQL and phpMyAdmin working fine on my Linode.
I'm trying to create a WordPress instance, but it's stuck at step 1 because it can't access the database.
I'm certain I know the login because I can access it both via command line and phpmyadmin.

What could be blocking access?

1 Reply

Hello,

What I recommend doing is taking a look at the wp-config.php file located in your WordPress site files. If you only see wp-config-sample.php just rename it to wp-config.php.

Once you have located the wp-config.php file take a look at the following lines with a text editor or via sudo nano wp-config.php to make sure that all your database information is correctly entered.

define('DB_NAME
define('DB_USER
define('DB_PASSWORD
define('DB_HOST

As well as well as

define('DB_HOST

To make sure that your database is pointing to the correct IP of the database server.

This article from WordPress may be helpful as well, it explains the wp-config.php in further detail.

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