Skip to content

Instantly share code, notes, and snippets.

@denisshevchenko
Created May 31, 2016 03:35
Show Gist options
  • Save denisshevchenko/2ecd88da8a48ac0c3105867e2850c4eb to your computer and use it in GitHub Desktop.
Save denisshevchenko/2ecd88da8a48ac0c3105867e2850c4eb to your computer and use it in GitHub Desktop.
$ mysqld --skip-grant-tables
$ mysql -u root mysql
$ update user set authentication_string=password('my_password') where user='root';
$ FLUSH PRIVILEGES;
# Restart mysqld without --skip-grant-tables flag.
# It's done!
$ mysql -u root mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment