โ๏ธ Installation and Setup of MySQL
To use MySQL, you must install the MySQL Server and a client tool to manage your databases.
๐ช Windows Installation
- Go to the official MySQL website: dev.mysql.com/downloads/installer
- Download the MySQL Installer for Windows (Community).
- Run the installer and choose:
- Developer Default โ recommended for beginners.
- Click Next and install required software (if prompted).
- Set a strong root password (remember this!).
- Click Execute and wait for installation to finish.
๐ macOS Installation
- Install Homebrew (if not already installed).
- Run the command:
brew install mysql
- Start MySQL server:
brew services start mysql
- Log in to MySQL:
mysql -u root
๐ง Linux (Ubuntu) Installation
- Update your packages:
sudo apt update
- Install MySQL Server:
sudo apt install mysql-server
- Secure the installation:
sudo mysql_secure_installation
- Log in:
sudo mysql
๐ Tools to Use with MySQL
- ๐ฅ๏ธ MySQL Command Line โ built-in terminal for running queries.
- ๐งฐ MySQL Workbench โ GUI tool for creating tables and writing SQL visually.
- ๐งช phpMyAdmin โ web-based tool for managing MySQL (use with XAMPP).
โ
Tip: Use mysql -u root -p
in terminal to log in with your password.