Most production data pipelines run on Linux, so installing MySQL on Ubuntu is a must-know skill for data science and engineering roles. The whole process takes four commands in the terminal.
Key Points
- Update packages: sudo apt update && sudo apt upgrade
- Install the server: sudo apt install mysql-server
- Harden the setup: sudo mysql_secure_installation (sets password rules, removes test DB)
- Log in: sudo mysql, then create your own user with CREATE USER and GRANT
- Check service status with systemctl status mysql
- For remote access, edit bind-address in mysqld.cnf and open port 3306 carefully
.png)