Remote Root Access for MariaDB on Ubuntu 16.04 LTS
Typically, when you install MySQL on Ubuntu, it asks you for a root password which you can then use to log into the database. It seems that MariaDB uses a plugin instead to authenticate the root user. This means that the only way to log into MariaDB by default as root is locally with sudo mysql -u root In order to give the root user a password and login the “traditional” way (which includes remote access via a tunnel) you have to do the following.
- Log into MariaDB as the Root user
sudo mysql -u root
- Disable the Auth Plugin
use mysql; update user set plugin='' where User='root';
- Create a password for the root user
grant all privileges on *.* to 'root'@'127.0.0.1' identified by '$STRONG_PASSWORD'; flush privileges;
- Restart MariaDB
sudo service mysql Restart
Thank you for reading! Share your thoughts with me on bluesky, mastodon, or via email.
Check out some more stuff to read down below.
Most popular posts this month
- SQLite DB Migrations with PRAGMA user_version
- Microblog
- How to Disable Wayland in Debian Testing
- Setting up ANTLR4 on Windows
- Scripting GNOME Terminal Tabs in Debian
Recent Favorite Blog Posts
This is a collection of the last 8 posts that I bookmarked.
- The contagion of fear from The Observation Deck
- The revolt of the reader from The Observation Deck
- Deeper dive: Were Touch Bar’s problems software rather than hardware? from Unsung
- Joining Cursor from Fatih Arslan
- Pluralistic: Digital sewer socialism (08 Aug 2026) from Pluralistic: Daily links from Cory Doctorow
- Pluralistic: Enshittification and Reverse Centaurs go global (29 Jul 2026) from Pluralistic: Daily links from Cory Doctorow
- AI Mania Is Eviscerating Global Decision-Making from Ludicity
- The default person from https://popagandhi.com/
Articles from blogs I follow around the net
“It Gives Great Demo”
There’s that famous video of Steve Jobs explaining why they don’t didn’t make touchscreen MacBooks: We thought about [a touch screen MacBook] years ago. We’ve done tons of user testing on this and it turns out it doesn’t work! Touch surfaces don’t want to...
via Jim Nielsen’s Blog November 4, 2026On the road for 8 months: Retrospective
My Trip around the world is now almost 8 months-in. Crazy to look back at the times and all the (36!) Countries I’ve visited, sometimes a day, sometimes almost 2-months! I have now turned 26, and am writing this blog on a phone in a café in Warsaw, Poland....
via Junwoo Hwang November 4, 2026The Trump Era is Collapsing and Big Tech is Officially On Notice
Cycles Hyped No More on November 4, 2026 The American electorate has spoken. And it’s not just MAGA Trumpism which has been repudiated, but the unseemly reign of douchebag techbroism. Cycles Hyped No More is a monthly column by Jared White where he takes a...
via The Internet Review November 4, 2026Generated by openring