MariaDB - root can't log in without using password

Really weird one here which I need some help with.

Running latest mariadb on 22.03. I cannot login to mysql unless I use
mysql -u root -p

If I try without -p I get the dreaded
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

All users use the mysql_native_password plugin including root

The DBM itself is running fine - we've got Wordpress and other web based apps running perfectly. The issue is that none of our automated backup scripts work as they assume a password-less mysqldump command and i have no desire to have a script containing any password!

Any ideas how to fix? I'm stumped

this isn't really openwrt related, but check last reply in https://syntaxfix.com/question/12196/error-1045-28000-access-denied-for-user-root-localhost-using-password-no

Thanks for this. Sadly it doesn't work as the later versions of mariadb don't allow users to be updated when the --skip-grant-tables flag is set (error 1290)

FLUSH PRIVILEGES;

Wow, you learn something new every day. I didn't know that. Thank you.

But sadly it still doesn't work :frowning:

Would this have anything to do with the mariadb plugins?

I'm not using any - just mariadb-client, mariadb-client-extra, mariadb-server, mariadb-server-base and mariadb-server-extra

Probably not, they might have however changed the default privilege settings.