Site icon RDR-IT

MariaDB : Access denied for user ‘root’@’localhost’

Just after installing MariaDB on Ubuntu / Debian, this error may appear if you try to connect with phpMyadmin.

To solve / work around the problem, we will create another user with the same level of rights as root.

1. Open an SSH connection on the server.

2. Enter the following commands:

mysql
CREATE USER 'admin'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit;

3. Restart the MariaDB service.

It is now possible to connect with the admin user on phpMyadmin

Exit mobile version