ERROR 1348 Column Password Is Not Updatable When Updating MySQL Root Password

MySQL and MariaDB password

When trying to update my root password database, either MySQL or MariaDB, i get this following error:

ERROR 1348 (HY000): Column 'Password' is not updatable

This is because i use this SQL command to update my root password, and it is wrong:

UPDATE mysql.user SET Password=PASSWORD('1234') WHERE User='root';

So you can't update a user password using Update commands, to update the password, use ALTER commands instead. like the following:

ALTER USER 'root'@'localhost' IDENTIFIED BY '1234';

And then using flush privileges to commit that command into the system, like this:

flush privileges;

So now you have your root with password 1234.

MySQL or MariaDB is one of My favorite database system for either developing or even i use it for my production services. It is easier to install and to manage than any other competitor database system out there.

I love MySQL, it is fast, and using SQL dialect that lot of peoples uses, so in case i got trouble finding the right commands to do something, just by searching online i can find the solution right away.


Popular posts from this blog

Flixify Video Streaming Platform

Push Notification Cordova, FCM And PHP