Wordpress and mysql Problem

Operating system: Ubuntu
OS version: 20.4

I was trying to install WordPress on my domain, and during the installation, I got an error coming from MySql. I got this error:

Now installing WordPress version 5.6.1 ..

Database connection failed : mysql::execute_sql failed : DBI connect failed : Access denied for user 'user-not-root'@'localhost' (using password: YES)

.. failed! See the error message above for a reason why.

I found an article from 2006 on this same issue, but the content was outdated.
From what I understand, isn’t a WordPress error but a MySql error.

From the Apache log file, I got this:

[Sat Feb 20 13:16:38.319866 2021] [ssl:warn] [pid 1130] AH01909: web_site.com:443:0 server certificate does NOT include an ID that matches the server name

[Sat Feb 20 13:19:44.457541 2021] [autoindex:error] [pid 1075507] [client] AH01276: Cannot serve directory /home/web_site/public_html/: No matching DirectoryIndex (index.php,index.php4,index.php5,index.htm,index.html) found, and server-generated directory index forbidden by Options directive

I’m not sure if it’s related.

You have three problems.

Your database password for the user you’re installing as is unknown to Virtualmin (or the username is wrong).

Your SSL certificate was generated for a domain different from the one for which Apache is serving.

You don’t have an index.php or index.html in the public_html for whatever site that log is for.

I don’t know how you got to any of those states, however.

Hi @Joe, each time I install PhpMyAdmin, the installer gave me the wrong password, so I go to the MySql database and change the password manually, and It works.
Now regarding WordPress, I don’t know what I should fix.

Regarding the SSL, I’m not using Let’s Encrypt SSL but instead Cloudflare OV SSL.


We can setup a screen sharing session if you’d like to go over stuff, but I will have to insist on this being a billable session as it seems you might have muddied up some things.

You know how to reach me.

Best Regards,
Peter Knowles | TPN Solutions

1 Like

It sounds to me like the user you’re using to install Wordpress doesn’t have permission to create a database. Like Joe said, I’m not sure how you got there, but that’s what it looks like.

You need to check the user permissions of the user you’re installing Wordpress with and make sure it has the appropriate database permissions.

Wordpress is a foolproof automatic install, so why you’re even having to bother with Phpmyadmin is beyond me.

Also, forget about the SSL for now. You have enough problems on your plate. Just get to a point you get Wordpress installed and you can worry about the SSL after that.


@Gomez_Adams Thanks but where should I go to change database permission? I check by myself and everything seems normal to me. (I wasn’t root)

The user you created when you created the virtual server should have all the database permissions you need. If it does not, then you need to edit that user, not the database.

Go to the virtual server you’re installing Wordpress on. On the left below that virtual server’s name you’ll see an EDIT USERS tab. Click that. Click the user you installed Wordpress with and check the permissions it has on databases.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.