Skip to content

Instantly share code, notes, and snippets.

@peterdalle
Last active August 14, 2017 13:26
Show Gist options
  • Save peterdalle/57ed9596858ffd05e4a9f8bb58fee04f to your computer and use it in GitHub Desktop.
Save peterdalle/57ed9596858ffd05e4a9f8bb58fee04f to your computer and use it in GitHub Desktop.
Grant root access to all MySQL tables, and set new password
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
UPDATE mysql.user
SET authentication_string = PASSWORD('root'), password_expired = 'N'
WHERE User = 'root' AND Host = '%';
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment