Migration to Mariadb

installation

(MD Support) #1

Sharing this for new users.

MariaDB introduced a new mysql.global_priv table in 10.4 and the mysql.user table is now just a virtual view of that table. Unfortunately this means if you follow any of the top hits on replacing blank password for new Mariadb/mysql installations, you will get following -

mysql -u root
MariaDB [mysql]> update mysql.user SET Password=PASSWORD(‘newpass’) where User=‘root’;
ERROR 1348 (HY000): Column ‘Password’ is not updatable

As Mariadb progresses towards plugin based functionality (and mysql gets choked by Oracle), new method is :

mysql -u root
MariaDB [mysql]> ALTER USER root@localhost IDENTIFIED VIA mysql_native_password USING PASSWORD(“newpass”);