1

I don't know whether this is the right Stack Exchange Q+A for this...

I just installed MariaDB in Linux Mint Cinnamon (18.1). mysql --version gives:

mysql  Ver 15.1 Distrib 10.0.34-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

During this installation, using these commands

sudo apt-get update
sudo apt-get install mariadb-server mariadb-client

... I was not asked for a root password.

Going here I found a recipe to set the password:

sudo -s
service mysqld stop
mysqld_safe ‐‐skip-grant-tables &
mysql -u root

(in MySQL/MariaDB)

use mysql;
update user set password=PASSWORD("root") where User='root';
flush privileges;

... things depart from the script at line update user:

Database changed
MariaDB [mysql]> update user set password=PASSWORD( "root" ) where User='root';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1  Changed: 0  Warnings: 0

MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

i.e. "0 rows affected" and "Changed: 0". And when I then run a SELECT query on the users table I see that the default password "*81F5E21E35... E1B" has not changed.

Any idea what's going wrong?

1

Aha... just when you thought it was safe to configure your database.

Turns out that MariaDB uses some fiendish "plugin" device, presumably to ensure extra security... as detailed here.

And for-simpleton (i.e. me) instructions to disable this "plugin" setup here.

When I did this I immediately found that my password was set to "root", which is what I had been trying to achieve by hook or by crook (this is not a real-world thing). I have no idea which of the various strategies managed to set that... but it is something to do with fiddling around with the sole user ("root") currently to be found in the users table of the... I think the mysql database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.