"mariadb warning: 'root@localhost' has both … the password will be ignored" Code Answer

2

it is normal, if by saying "accessing the db via mysql -u root -p works fine" you mean that you are running it while being a system root (or under sudo). you should not be able to do it as an ordinary user.

packages generated by ubuntu by default have unix_socket authentication for the local root. to check, run

select user, host, plugin from mysql.user;

you should see unix_socket in the plugin column for root@localhost.

if you want to use the password authentication instead, run

update mysql.user set plugin = '' where plugin = 'unix_socket';
flush privileges;
By user823255 on October 13 2022

Answers related to “mariadb warning: 'root@localhost' has both … the password will be ignored”

Only authorized users can answer the Search term. Please sign in first, or register a free account.