Skip to content

Instantly share code, notes, and snippets.

@bokwoon95
Created December 5, 2019 15:26
Show Gist options
  • Save bokwoon95/d9d02c220c3c71d4bc2817309dc05c46 to your computer and use it in GitHub Desktop.
Save bokwoon95/d9d02c220c3c71d4bc2817309dc05c46 to your computer and use it in GitHub Desktop.
#!/bin/bash
sudo apt-get update
sudo apt-get install -y mysql-server
# sudo mysql_secure_installation
echo "
CREATE USER 'pg'@'localhost' IDENTIFIED BY 'pg';
CREATE USER 'pg'@'%' IDENTIFIED BY 'pg';
GRANT ALL PRIVILEGES ON *.* TO 'pg'@'localhost' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'pg'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
" | tee /dev/tty | sudo mysql # https://tableplus.com/blog/2018/10/how-to-create-a-superuser-in-mysql.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment