Skip to content

Instantly share code, notes, and snippets.

@enumag
Created October 3, 2016 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enumag/e1e485f00a4e5e6bcd6047907f273c68 to your computer and use it in GitHub Desktop.
Save enumag/e1e485f00a4e5e6bcd6047907f273c68 to your computer and use it in GitHub Desktop.
```
$ sudo service mysql stop
$ sudo mysqld_safe --skip-grant-tables --skip-syslog --skip-networking
```
leave it be, run second terminal:
```
$ mysql -u root
$ UPDATE mysql.user SET authentication_string=PASSWORD('password') WHERE User='root';
$ UPDATE mysql.user SET plugin="mysql_native_password";
$ FLUSH PRIVILEGES;
$ exit;
```
close the first terminal
```
$ sudo service mysql start
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment