-
-
Save LinuxFintech/8c75e5ec6d0827890c0c776bfbc597e4 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
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