MySQL root can’t login to phpMyAdmin

On Debian/Ubuntu MySQL root user can only login using socket. This is done with Plugin.

MariaDB [(none)]> select User, Plugin from mysql.user;
+-----------+-------------+
| User      | Plugin      |
+-----------+-------------+
| root      | unix_socket |
| sserverok |             |
+-----------+-------------+
2 rows in set (0.00 sec)

MariaDB [(none)]> 

To fix this, first set a password for user root.

Change MySQL root password

To disable plugin, run following commands in MySQL command prompt as user root.

update mysql.user set Plugin='' where User="root";
flush privileges;

MySQL
phpMyAdmin

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *