MySQL/version/5.7
< MySQL
Jump to navigation
Jump to search
Recovering / Setting passwords
A lot of the instructions online for doing this no longer work with 5.7.
Obsolete instructions:
- Mysql (MariaDB 10.0.29): Set root password, but still can login without asking password?: the SQL command for changing passwords is different
- SET PASSWORD is deprecated, but may work
- ALTER USER is preferred.
- BUT that won't work when grant tables are skipped; you have to use
update user set authentication_string=PASSWORD("new_password") where User='root';
- Setting, Changing And Resetting MySQL Root Passwords
- default value for --skip-grant-tables is now FALSE, so you have to specify
--skip-grant-tables=TRUE
- default value for --skip-grant-tables is now FALSE, so you have to specify