sajad torkamani

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) 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