Created
January 23, 2018 22:55
-
-
Save aarsla/d37621a92b797e53aff38fd7913518a2 to your computer and use it in GitHub Desktop.
MariaDB reset root password
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo /etc/init.d/mysql stop | |
sudo mysqld_safe --skip-grant-tables --skip-networking & | |
FLUSH PRIVILEGES; | |
USE mysql; | |
UPDATE user SET plugin=""; | |
UPDATE user SET password=PASSWORD('MyNewPass') WHERE User='root' AND Host = 'localhost'; | |
FLUSH PRIVILEGES; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment