Error establishing a database connection - Issue with MySQL / phpMyAdmin

Hello friends, I moved from Plesk to HestiaCP and am a bit lost.
I did a clean install of HestiaCP on a fresh Debian 12 machine.

  • Run install script
  • Modify a few settings (e.g. disable plugins and php versions I don’t need)
  • Create a new user
  • Add a couple domains
  • Enable SSL for all domains

Everything seems to run smoothly except there seems to be something wrong with mysql: Database creation via Hestia works. But when I try to do a wordpress install, I get “Error establishing a database connection” (whether I let the Quick Install create the database or use an exisiting one doesn’t matter)
As you can see in my screenshots, the databases create just fine, but when I attempt to use phpMyAdmin to access them, I am greeted with a bunch of errors and warnings.

What I’ve tried:

  • Do the complete installation process again on a different machine.
  • Change root password using mysqladmin and in /root/.my.cnf & /usr/local/hestia/conf/mysql.conf to a different one

Unable to post multiple images in one message, but I think these are important:

You don’t have the phpmyadmin db created so, something failed during install.

Hi sahsanu, thanks for the reply. You are correct, I found the following in the output of my setup script:

I also saw a bunch of warnings but I suppose those don’t matter:

[ ! ] Adding missing variable to hestia.conf: ENFORCE_SUBDOMAIN_OWNERSHIP ('yes')
[ ! ] Adding missing variable to hestia.conf: DEBUG_MODE ('false')

Apart from that, no anomalies in the logs.

What could be the reason for the mariadb access denied error?
How do I approach fixing this? I’m on a fresh Debian 12 minimal install.

Those messages are ok.

Could you please show the output of this command?

grep localhost /etc/hosts

Regarding phpmyadmin, let’s see this first and I will tell you a way to try to reinstall it.

Here you go:

root@centaur:~# grep localhost /etc/hosts       localhost
::1     localhost ip6-localhost ip6-loopback

That looks fine.

Try this command and show me the output:

mysql -u root -h localhost -e 'show databases;'

If it shows an error like:

ERROR 1698 (28000): Access denied for user 'root'@'localhost'

Edit file /etc/hosts and remove localhost from this line:

::1     localhost ip6-localhost ip6-loopback

So it will look like this:

::1     ip6-localhost ip6-loopback

And try the mysql command again.