If you've upgraded to MariaDB version 10.4, you may be surprised to learn that it no longer uses the root user the same way it used before. For most situations it should not be a problem, because most software packages should not use the root user anyway. Except that you may have other database management software that uses the root user to manage the MySQL databases, and they would no longer work. For example, if you use Webmin to manage your server that worked well with the old version of MySQL, you may find that it cannot login to MySQL server after the upgrade:
Webmin needs to know your MySQL administration login and password in order to manage your database. Please enter your administration username (usually root) and password below.
The problem is, the latest version of MariaDB changed the handling of the root user quite significantly. There is a way to make it work to keep other software like Webmin happy. We just need to reset the password for the root user. You may find quite a few online tutorials that suggest using the command mysqld_safe --skip-grant-tables to reset the root password, but when you try it, you may be surprised to learn that it no longer works with MariaDB 10.4 (again, because they had changed the handling of the root user.)
First things first though: what is described below worked for us, but it MAY NOT WORK for your specific server configuration. THE FOLLOWING INFORMATION IS PROVIDED "AS-IS" WITHOUT A WARRANTY OF ANY KIND. BY CHOOSING TO USE THE FOLLOWING INFORMATION, YOU ASSUME THE ENTIRE RISK OF SELECTION, APPLICATION, AND USE OF THE INFORMATION. INDEPENDENT OF THE FORGOING PROVISIONS, IN NO EVENT AND UNDER NO LEGAL THEORY, INCLUDING WITHOUT LIMITATION, TORT, CONTRACT, OR STRICT PRODUCTS LIABILITY, SHALL WINABILITY SOFTWARE CORPORATION OR ANY OF ITS SUPPLIERS BE LIABLE TO YOU OR ANY OTHER PERSON OR ENTITY FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER MALFUNCTION, OR ANY OTHER KIND OF COMMERCIAL DAMAGE, EVEN IF WINABILITY SOFTWARE CORPORATION HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY TO THE EXTENT PROHIBITED BY APPLICABLE LAW. IN NO EVENT SHALL WINABILITY SOFTWARE CORPORATION'S LIABILITY FOR ACTUAL DAMAGES FOR ANY CAUSE WHATSOEVER, AND REGARDLESS OF THE FORM OF ACTION, EXCEED THE AMOUNT OF THE PURCHASE PRICE PAID FOR THE SOFTWARE LICENSE OR ONE UNITED STATES DOLLAR, WHICHEVER IS THE GREATER.
IF YOU DO NOT AGREE TO FULLY ACCSEPT THE RISK OF USING THIS INFORMATION, STOP HERE. If you do agree, let's continue.
To reset the root user password for MariaDB 10.4, try sudo mysql instead:
$ sudo mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 40 Server version: 10.4.12-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>
Now enter the following command at the MariaDB command prompt (replace secret with the actual password of the root user that you want to set):
MariaDB [(none)]> ALTER USER root@localhost IDENTIFIED VIA mysql_native_password USING PASSWORD("secret");
Now try Webmin to log in to the MySQL server again, using the same root password. Happy MySQL-ing!
- How to reset the root password after upgrading MariaDB
- How to upgrade MySQL or MariaDB properly
- Force DISKPART to delete EFI system partition on Windows 10
- How to make Windows 10 recognize a cloned hard drive again
- How to stop Windows 10 from using thumbnail preview icons for folders
- How to hide pictures from the Photos app in Windows 10
- How to save Windows Spotlight photos to your computer
- How to move the OneDrive folder to an encrypted drive
- Windows 10 fails to upgrade? Here is how to fix it.
- How to stop Microsoft Edge from hijacking PDF files
- Preventing installations of specific programs with Folder Guard
- Folder Guard licensing explained
- Speed up the updates of the network folders
- Make your Windows laptop work as a Wi-Fi access point
- How to stop automatic updates on Windows 10
- Windows cannot connect to the printer. Access is denied.
- Migrating encrypted data from TrueCrypt to USBCrypt
- Enhancing a photo CD collection with PhotoLauncher
- “The Microsoft account service is unavailable right now. Try again later.”
- Using DiffMerge as the external tool of AB Commander to compare plain text files
- How to erase the icon and/or thumbnail cache in Windows 10 and 8
- Transferring images between your PC and an Android device: Part 2
- Transferring images between your PC and an Android device: Part 1
- Case study: Using SoftDetective to suppress Corel Guide sign-in prompt
- Using junction points to change the iTunes backup folder location
- How to tell if my Windows is 32- or 64-bit?
- How do I stop Windows from rearranging my desktop icons?
- Organize your photo library with the Rename tool of AB Commander
- Windows does not offer the NTFS format option? Here is how to bring it back.
- Encrypt Firefox profile with USBCrypt
- Restarting Windows 10 and Windows 8 in the safe mode
- Integrating AB Commander with Universal Viewer
- How we host our web sites
- How to delete a protected EFI disk partition with Windows 10, 8, or 7
- Using Folder Guard to protect from the “social engineering” attacks
- How to erase Windows login password if you forget it
- How to unhide a folder hidden with Folder Guard
- How to repair Windows desktop icons with AB Commander
- Slow network in Windows 7 Virtual PC? Speed it up!
- How to show drive letters first in AB Commander and Windows Explorer
- What is my IP address?
- Amazon Cloud Drive offers free 5 GB online storage
- Why can’t I copy large files over 4GB to my USB flash drive or SD card?
- Test the strength of your password with USBCrypt
- Setting up the external text editor for AB Commander
- How to restrict Internet Explorer from downloading programs from the Internet
- Personal vs business license for USBCrypt
- Use Folder Guard to restrict access to Control Panel
- Compare MySecretFolder and Folder Guard
- Hide folders with Folder Guard
- Compare ActiveExit to WINEXIT
- Lock folders and drives with passwords
- Locking access to the external drives with Folder Guard
- Protecting Dropbox folder with USBCrypt
- How to set up Folder Guard to stop downloading from the Internet
- Is “Wipe the content” the same as “Secure Delete”?
- Can USBCrypt encrypt the C: drive?
- Make it easier to return your lost encrypted drive
- USBCrypt for users of Microsoft® Office
- Start programs elevated from a batch file
- How to make elevated programs recognize network drives
- How to disable hibernation with AB Commander
- Using names and labels to organize USBCrypt drives
- How to password-protect a USB flash drive
- Always have a backup of your important files