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 - Percona Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset:>
Active: active (running) since Tue 2024-09-17 08:18:19 +0530; 8h ago
Process: 691 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=ex>
Main PID: 816 (mysqld)
Status: "Server is operational"
Tasks: 56 (limit: 18891)
Memory: 173.3M
CPU: 5min 15.820s
CGroup: /system.slice/mysql.service
└─816 /usr/sbin/mysqld