mariadb Access denied for user 'root'@'localhost' to database code example
Example 1: access denied for user 'root'@'localhost' mariadb
UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'root' AND plugin = 'unix_socket';
FLUSH PRIVILEGES;
Example 2: mariadb mysql root access denied
UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'root' AND plugin = 'unix_socket';
FLUSH PRIVILEGES;