Skip to content

Instantly share code, notes, and snippets.

@jayshields
Last active July 26, 2018 08:48
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 jayshields/e89b2d2e3613ca899acdd1ae420e3e1b to your computer and use it in GitHub Desktop.
Save jayshields/e89b2d2e3613ca899acdd1ae420e3e1b to your computer and use it in GitHub Desktop.
MySQL 5.7.22 on Ubuntu 18.04 set root password to blank (for local dev only!)
sudo /etc/init.d/mysql stop
sudo mkdir /var/run/mysqld/
sudo chown mysql /var/run/mysqld/
sudo mysqld_safe --skip-grant-tables &
mysql -u root
use mysql;
update user set authentication_string = PASSWORD(""), plugin = "mysql_native_password" where User='root';
flush privileges;
quit;
sudo /etc/init.d/mysql stop
sudo /etc/init.d/mysql start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment