MySQL ubuntu
How To Install MySQL on Ubuntu 20.04
we will be using the terminal to install MySQL
open a terminal
sudo apt update
Command to install MySQL
1
sudo apt install mysql-server
Install the mysql-server package
- past code into terminal
1
sudo apt install mysql-server
Ensure that MySQL is runing
past code into terminal
can allso stop or restart mysql by changeing the start command
1
sudo systemctl start mysql.service
Configuring MySQL
First open up the MySQL prompt
to do this past command into terminal
1
sudo mysql
Password configuration
now that you are in the MySQL prompt you will need to set a password for the root user
- copy and past the following command into the MySQL prompt
- change password with the password you dislike
1
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Now save the changes
after you close the session the password will be set
close by pasting the following command into the MySQL prompt
1
exit
Now to login to MySQL
past the following command into the terminal
place your password after asked
1
mysql -u root -p
Mysql-workbench-community
if you want a gui to interact with mysql you can use mysql workbench
past the following command into the terminal
1
sudo docker exec tailscaled tailscale up --authkey=<AUTH KEY FROM tailscale>
This post is licensed under CC BY 4.0 by the author.