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

MySQL and MariaDB password

As already mentioned in the title of this blog, this error message sometimes occurred when we are trying to update our root password database, either MySQL or MariaDB, The error says:
ERROR 1348 (HY000): Column 'Password' is not updatable
This is because if we use this SQL command to update our database root password, and it turn out to be Restricted by MySQL to use update on mysql database.
UPDATE mysql.user SET Password=PASSWORD('1234') WHERE User='root';


The solutions for MySQL Error1348

So you can not 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 you need to do the flush privileges to commit previous queries (that alter command above) into the system, simply do like this.
flush privileges;
So now you have your root with password 1234. Although it is recommended to use much more stronger unpredictable password. Never use 1234 as password of any of your login credentials, unless it is just for testing.

I've been using MySQL since the beginning of my software development career, and I still sometimes struggle to memorize some SQL commands. Even something as simple as updating a MySQL user password can trip me up without looking at this blog for reference. So, this blog has become my public notebook.

To change not only the root password but also any other MySQL user password in your database, you should use the `ALTER` command, not `UPDATE`. The `UPDATE` command is more suitable for updating our own databases, not the MySQL system database like the one named `mysql`. The `mysql` database is an auto-generated MySQL default database used for storing lists of eligible users, MySQL system configurations, languages, etc.

MySQL, or MariaDB, is one of my favorite relational database management systems (RDBMS) for both development and production services. It's a large enterprise database system proven to handle numerous transactions in the big production data centers of many major companies.

Installing and managing MySQL is easier than with any other competing database systems out there. This simplicity speeds up my application development and ensures stability in our production applications.

I love MySQL. It's fast and uses a SQL dialect that many people are familiar with, so if I run into trouble with some SQL commands, a quick Google search usually leads me to a solution right away. MySQL can handle everything from simple SQL queries to advanced complex queries, reliably and quickly.

I think MySQL is probably the perfect free database system in the world. Despite being free, it's proven to be the right choice for many startups and big companies alike. Although there are several cons, MySQL continues to evolve and improve, becoming better and better over time.

Popular posts from this blog

How To Create Spring Boot Project Using Netbeans

How To Connect SSH Using PEM Certificate On Windows