Last active
September 6, 2019 12:24
-
-
Save zainengineer/8ae85d3854218127202228b6bfd83c83 to your computer and use it in GitHub Desktop.
mysql mariadb root password reset
This file contains hidden or 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 mysql_secure_installation | |
#its sometimes enough | |
some time usual approach of passwords reset does not work | |
https://superuser.com/a/949768/366778 | |
SELECT user, plugin FROM user; | |
UPDATE user SET plugin=""; | |
Newer mariadb even that does not work | |
MariaDB [mysql]> UPDATE user SET plugin=""; | |
ERROR 1348 (HY000): Column 'plugin' is not updatable | |
sudo mysql -uroot --protocol=socket | |
set password = password(""); | |
normally you can do like usual | |
https://tecadmin.net/steps-to-reset-mariadb-root-password-in-linux/ | |
sudo service mysql stop | |
mysqld_safe --skip-grant-tables & | |
mysql -u root | |
use mysql; | |
UPDATE user SET authentication_string = password("root") where User='root'; | |
FLUSH PRIVILEGES; | |
#not sure of that | |
fg 1 | |
sudo service mysql restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment