Step 1 — Installing MySQL
sudo apt update
-
Install the MySQL server package
sudo apt install mysql-server
sudo systemctl start mysql.service
-
Check MySQL server status
sudo systemctl status mysql
- The status should look like this
● mysql.service - PerconaMySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset:> enabled)
Active: active (running) since Tue 2024-09-172020-04-21 08:18:1912:56:48 +0530;UTC; 8h6min ago
Process: 691 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=ex>
Main PID: 81610382 (mysqld)
Status: "Server is operational"
Tasks: 5639 (limit: 18891)1137)
Memory: 173.3M
CPU: 5min 15.820s370.0M
CGroup: /system.slice/mysql.service
└─81610382 /usr/sbin/mysqld