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
- Lev Lazinskiy
- Edge Detection with Inkscape
- Org Mode To Google Docs and Beyond
- Spring Security, Webjars, and MIME type error
Recent Favorite Blog Posts
This is a collection of the last 8 posts that I bookmarked.
- 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/
- No-One Escapes the Permanent Underclass from Fernando Borretti
- Is it ethical to use AI? from charity.wtf
Articles from blogs I follow around the net
Have You Heard the Good News About Microlighter?
Dave Rupert wrote about shipping microlighter: a tool for handling syntax highlighting using the CSS Custom Highlights API. I saw his post the day he released it, and I had an implementation PR up for my blog by end of day. Then, like I do with so many thi...
via Jim Nielsen’s Blog August 25, 2026Two previews for the price of one
A thoughtful moment in the Arrange Displays pop-up in macOS’s Settings when you choose to designate a screen to be a primary screen: It not only shows a nice preview of where your menu is going to land, but also changes the shape of the menu proxy you’re h...
via Unsung August 25, 2026Pluralistic: How Canada can help Americans and defeat America (23 Aug 2026)
Today's links How Canada can save Americans and defeat America: True Carneyism has never been tried. Hey look at this: Delights to delectate. Object permanence: Brazil v AIDS drug patents; TSA v gel-bras; After the Siege (Russian); Names are hard; Layton's...
via Pluralistic: Daily links from Cory Doctorow August 24, 2026Generated by openring