Skip to content
Fragmented Development

MariaDB / mysql root password on Debian Stretch

I was a little perplexed when I installed a MariaDB server on my main desktop running Debian Stretch; it didn't ask me for a root password. This is a change from the previous Debians, which always prompt you to set the password during installation.

Not to fret, though. It seems like the way to login as root is to run the client as root with the sudo command.

Instead of the old mysql -u root -p command, you can just use sudo mysql and you're presented with the root prompt!

Much easier to do, as long as you know what to do. :P

Tags: server


Comments

Thanks very much, seems weird that you can't log in as root with a password, even if you set one!

Tom


Add Your Comment