-
-
Save LinauxTerminology/8c7ff5a1a7fc12fa9f137a35be499289 to your computer and use it in GitHub Desktop.
Install MySQL on Ubuntu 20.04 [Quickstart]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -i | |
apt update | |
apt install mysql-server | |
mysql_secure_installation | |
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 | |
mysql -u masum -p | |
# use pass 01722G@usia for login | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment