MYSQL ERROR 1396 (HY000): Operation ALTER USER failed

Hi, this has been driving me nuts, cannot find out where I am going wrong. I am trying to change the password for a user on 24.04 and I am assuming vers 8 of MYSQL… I am far from expert at most of this. This is the error I get when I try this command:-
ALTER USER ‘paul’@‘localhost’ IDENTIFIED BY ‘apassword’;
But all I get is:-
ERROR 1396 (HY000): Operation ALTER USER failed for ‘paul’@‘localhost’

Any help gratefully received. Do bear with me as I am partially sighted and takes me longer to do most things.

Paul.

Read through the page at the link below which explains the process. Unless you have given all privileges to that user, you need to access mysql and use the mysql root user password to make that change. This is not the same as your Linux system root user password if you have set that up.

https://www.cyberciti.biz/faq/mysql-change-user-password/

This error normally occurs when the host machine on which mysql resides does not recognise the name of the machine in its database. For instance, depending on user permissions you could try paul@127.0.0.1 or paul@(insert your machine’s ip address). It depends how the database was originally set up.
Tony.

1 Like

Thanks for the reply. It seems that the only simple solution was to clean install and start again. Just feel that I had made too much of a mess of the install.

Thanks
Paul.