Skip to content

Instantly share code, notes, and snippets.

@jelovac
Created June 13, 2018 09:51
Show Gist options
  • Save jelovac/9afce7c74e50e254d1b870b4d4be9766 to your computer and use it in GitHub Desktop.
Save jelovac/9afce7c74e50e254d1b870b4d4be9766 to your computer and use it in GitHub Desktop.
Set default root password on Ubuntu MySQL >=5.7
/* The new MySQL version on Ubuntu uses socket type authentification, in order to revert to password based use the following */
USE mysql;
UPDATE user SET authentication_string = PASSWORD(‘YourPassword’), plugin = ‘mysql_native_password’ WHERE User = ‘root’;
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment