Running MariaDB 10.1.23-MariaDB-9+deb9u1 on Debian 9.1.
Fresh OS installation, installed MariaDB with apt-get install mariadb-server mariadb-client
Apparently MariaDB doesn't ask for a root password on install so I'm going to set it after the fact:
# mysql -uroot
> select user from mysql.user;
+------+
| user |
+------+
| root |
+------+
Ok, so root exists. Now to change its password:
> set password for 'root'@'localhost' = PASSWORD('P@ssw0rd');
> flush privileges;
> exit
Did it work?
# mysql -uroot -pblabla
MariaDB [(none)]>
Setting the password went ok but why is MariaDB accepting any random password and even an empty one?
This installation doesn't accept ALTER USER statement.