Can't login to phpmyadmin

Hey, I was trying to login to MySQL server using https://hostname.tld/phpmyadmin using the password found in /usr/local/hestia/conf/mysql.conf

However, I got the following error:

mysqli::real_connect(): (HY000/1698): Access denied for user 'root'@'localhost'

Then just to verify the issue I tried to login via cli using the command mysql -u root -p and got the following error:
Screenshot from 2025-07-08 20-28-39

But upon checking the list of users, I can verify root user exist and should be able to access from localhost
image

What could be preventing me to login to phpmyadmin?

PHPMyAdmin doesn’t allow login with root user. You could use a workaround and create a new user with root privileges.

The command below will create the user newroot with the password some_password. Change them to suit your needs.

mariadb --defaults-file=/root/.my.cnf -uroot -e "CREATE USER 'newroot'@'localhost' IDENTIFIED BY 'some_password';"
mariadb --defaults-file=/root/.my.cnf -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'newroot'@'localhost' WITH GRANT OPTION;FLUSH PRIVILEGES;"

Once the user is created, try logging in with it in phpMyAdmin.

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