Skip to content

Instantly share code, notes, and snippets.

@ityulkanov
Created April 25, 2024 16:30
Show Gist options
  • Save ityulkanov/36d05ca85b32266f8057c58f294a060d to your computer and use it in GitHub Desktop.
Save ityulkanov/36d05ca85b32266f8057c58f294a060d to your computer and use it in GitHub Desktop.
# to change to safe mode
sudo mysqld_safe --skip-grant-tables
# to login to the terminal enter:
mysql u - root
# run this command to update password
UPDATE mysql.user SET Password=PASSWORD('password') WHERE user = 'root';
# dont forget to flush privileges
FLUSH PRIVILEGES;
# now we can quit
\q
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment