Install MySQL 8.0.27 on Ubuntu 20.04
11 March 2022 (Updated 18 October 2023)
Install MySQL package
sudo apt update && sudo apt install mysql-server
Secure installation
sudo mysql_secure_installation
Enter a strong password (use a tool like LastPass or this) and save this password somewhere. Press Enter for the remaining prompts to accept the sane defaults.
Verify installation
sudo mysql
This should log you in to the MySQL server as the root user. If setting up MySQL on a production server, you’ll want to create a separate MySQL user with restricted access for each application.
Sources
Tagged:
MySQL