Here’s how to install MySQL on Ubuntu using the terminal — works for Ubuntu 20.04, 22.04, and newer.
✅ Step-by-Step: Install MySQL on Ubuntu
1. Update package index
2. Install MySQL Server
3. Start MySQL Service
4. Enable MySQL to start on boot
5. Secure the installation (optional but recommended)
-
Set a root password
-
Remove anonymous users
-
Disallow remote root login
-
Remove test database
-
Reload privilege tables
6. Verify MySQL is Running
7. Log in to MySQL
📦 Optional: Install MySQL Workbench (GUI)
Let me know if you want to:
-
Create a new database and user
-
Connect MySQL with Python (using
mysql-connector-python
) -
Allow remote connections or configure firewall settings
I'm here to help.
No comments:
Post a Comment