sudo systemctl enable --now mysql

Category: Databases & SQL

sudo systemctl enable --now mysql

Start MySQL now and at every boot

enable --now starts the MySQL service immediately and registers it to start at boot. The unit is named mysql on Debian and Ubuntu, mysqld on some other distributions. Confirm with sudo systemctl status mysql.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.