Allowing 'root' access to PhpMyAdmin for MariaDB

Instructions on how to enable root login in phpMyAdmin for MariaDB

In the new version of MySQL (or MariaDB) user 'root' can not connect to the database server through PhpMyAdmin. To solve this problem perform the following actions.

``.shell [root@kvmde54-19861 ~]# mysql -V mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1


Connect to the database server as root user in the terminal and use 'mysql' database:
``.shell
mysql -u root -p mysql

Change the 'plugin' value for the 'root' user in the 'users' table: ``.shell MariaDB [mysql]> update user set plugin='' where user='root'


Set privileges:
``.shell
MariaDB [mysql]&gt
flush privileges

If you want to go back to disabling root access from anything other than the shell, you can follow the same steps, but in the second step change the value of "plugin" to "unix_socket". ``.shell update user set plugin='unix_socket' where user='root'


![file](/media/article/img/Снимок_экрана_2020-05-06_в_16.32.14.png)
Need help?Our engineers will help you free of charge with any question in minutesContact us