Skip to content

Instantly share code, notes, and snippets.

@LinuxFintech
Forked from UbuntuEvangelist/MySQLFocal.sh
Created June 3, 2021 17:53
Show Gist options
  • Save LinuxFintech/8c75e5ec6d0827890c0c776bfbc597e4 to your computer and use it in GitHub Desktop.
Save LinuxFintech/8c75e5ec6d0827890c0c776bfbc597e4 to your computer and use it in GitHub Desktop.
Install MySQL on Ubuntu 20.04 [Quickstart]
apt install mysql-server
mysql_secure_installation
mysql --version
service mysql start
service mysql enable
service mysql restart
service mysql status
ufw allow from any to any port 3306 proto tcp
systemctl restart mysql
systemctl enable mysql
nano /etc/mysql/mysql.conf.d/mysqld.cnf
#And then change the bind-address line to 0.0.0.0
# Save and exit
ufw allow from any to any port 3306 proto tcp
sudo systemctl restart mysql
sudo systemctl enable mysql
sudo mysql
CREATE DATABASE mydb;
CREATE USER 'masum'@'localhost' IDENTIFIED WITH mysql_native_password BY '01722G@usia';
ALTER USER 'masum'@'localhost' IDENTIFIED WITH mysql_native_password BY '01722G@usia';
GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT on *.* TO 'masum'@'localhost' WITH GRANT OPTION;
use mydb;
FLUSH PRIVILEGES;
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment