Install and start
sudo apt update
sudo apt install -y mysql-server
sudo systemctl enable --now mysql
Secure it
sudo mysql_secure_installation
Answer the questions: a password policy, and remove the test database and the anonymous users.
A database and a user for your application
sudo mysql -e "CREATE DATABASE app; CREATE USER 'app'@'localhost' IDENTIFIED BY 'CHANGE-THIS-PASSWORD'; GRANT ALL ON app.* TO 'app'@'localhost'; FLUSH PRIVILEGES;"
Use your own names and a long password of your own. The database listens only on the server itself — do not open port 3306 to the internet.
Stuck? Ask Joy Ops AI in your console, or open a ticket — a person answers.
Was this article helpful?
Corrections and suggestions go straight to the team that wrote it — suggest an edit or see more in blog.
Corrections and suggestions go straight to the team that wrote it — suggest an edit or see more in blog.