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

Advertisement

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

Add a comment

Leave a Reply

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

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement