Skip to content

Instantly share code, notes, and snippets.

@adlerdias
Created January 4, 2019 13:38
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 adlerdias/27aa34d1ca36a4c4e2d89dbab6652c9c to your computer and use it in GitHub Desktop.
Save adlerdias/27aa34d1ca36a4c4e2d89dbab6652c9c to your computer and use it in GitHub Desktop.
Ubuntu 18.04: Mysql

1 Install Mysql

$ sudo apt-get install mysql-server
$ mysql_secure_installation    

2 If you got Error: Access denied for user 'root'@'localhost' on mysql_secure_installation

$ sudo mysql -u root -p
mysql> drop user 'root'@'localhost';
mysql> create user 'root'@'%' identified by 'your_pass';
mysql> grant all privileges on *.* to 'root'@'%' with grant option;
mysql> flush privileges;
mysql> exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment