Skip to content

Instantly share code, notes, and snippets.

@methbkts
Last active September 5, 2019 12:17
Show Gist options
  • Select an option

  • Save methbkts/02943cbb11e7bbe65aba16ba689a1736 to your computer and use it in GitHub Desktop.

Select an option

Save methbkts/02943cbb11e7bbe65aba16ba689a1736 to your computer and use it in GitHub Desktop.
How to change MySQL root password in Ubuntu Bionic (dev, don't use in production)
sudo mysql -uroot
mysql> USE mysql;
mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '0000';
mysql> exit;
sudo service mysql restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment