Created
August 8, 2018 09:49
-
-
Save arjus/fbfe71233b943d1ee67432e4b1b33009 to your computer and use it in GitHub Desktop.
Solve mariadb root password access denied
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
# stop maria db | |
sudo systemctl stop mysql | |
sudo systemctl stop mariadb | |
# start mysql without checks | |
sudo mysqld_safe --skip-grant-tables & | |
sudo mysql -u root | |
#update user root pass | |
use mysql | |
SELECT user, plugin FROM user; | |
UPDATE user SET plugin=""; | |
UPDATE user SET password=PASSWORD("my_password") WHERE user="root"; | |
FLUSH PRIVILEGES; | |
# restart mariadb | |
sudo systemctl stop mariadb | |
/etc/init.d/mysql start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment