Installatron is a great server product. We have been using it since May of 2016 on a number of our website servers. Installatron is very cost effective and interfaces directly with DirectAdmin. It allows CharlesWorks staff to quickly set up websites on our servers for our clients.
Installatron provides for setting up many different types of sites. This includes WordPress, which happens to be our favorite. In fact, WordPress appears to be most people’s favorite. Nearly 40% of all websites are built using WordPress at the time of this writing.
Today, we went to set up a WordPress website as usual. However, we were presented with this error instead:
Error mysql database connection failed: host = localhost database = **************** username = **************** password = **HIDDEN** prefix = ********* errstr = Could not connect to `localhost` using the username `****************`
and password **HIDDEN** (mysqli) --  The server requested authentication method unknown to the client
Since the error was happening in Installatron, we contacted Installatron support for assistance with this. We have a number of servers, and found that Installatron was working on all our others. So, something must have been different with this server.
The Database Connection Problem
I had upgraded this particular server using DirectAdmin’s CustomBuild from MySQL 5.x to MySQL 8.x within a couple days earlier. Believing the update caused an issue, I contacted DirectAdmin support and their support team looked into it. They indicated they believed the issue was an Installatron issue.
Hindsight is always 20/20. What I should have tried prior to contacting DirectAdmin was setting up a WordPress site manually. When I set up a WordPress site manually, it worked fine first time out. Plus, this is a production server. All sites already on the server were operating just fine with no database issues.
Installatron support explained that the DirectAdmin Upgrade from MySQL 5.x to MySQL 8.x left an old-style MySQL user password on MySQL 8. This made no issue for existing site or for new sites manually set up. But it caused an issue with Installatron. After some back and forth with Installatron support, they referred my ticket to their development staff.
The Database Connection Solution
Installatron development confirmed that the issue was from the upgrade from MySQL 5.7 to 8.0.
They found another ticket under which someone reported the same issue and they fixed the issue by adding the below line to the server’s /etc/my.cnf file under the [mysqld] section and restarting MySQL. At the command line, logged in as the root user, and I did this:
cd /etc nano my.cnf
Nano is my favorite command line text editor. Once in there, I noticed the configuration file is a very short one. I found the [mysqld] section and added this line under it:
Then I did the CTRL O to save it and CTRL X to exit nano.
Since I had the server’s administrative DirectAdmin panel open already, I navigated to Admin Tools > Service Monitor > mysqld and had it Restart. I could have also done this while at the command prompt of my Debian system using:
Then I did a test to set up a WordPress website and Installatron worked just fine again.
I suspect this situation would occur only on an upgrade from MySQL 5.7 to MySQL 8.0 because the master passwords are not totally compatible.