Cannot login to MariaDB server with root account


You are trying to login to MariaDB with the root user, but even after resetting the password, it is still not possible to login.


It seems that certain MariaDB packages that come with Linux distributions use the unix_socket as the authentication method.

MariaDB [mysql]> SELECT user, host, plugin FROM user WHERE user='root';
| user | host      | plugin      |
| root | localhost | unix_socket |
1 row in set (0.00 sec)

Change the plugin as described here ( with the following:

MariaDB [mysql]> UPDATE mysql.user SET plugin = '' WHERE user = 'root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0