0% found this document useful (0 votes)
16 views3 pages

MySQL Installation Guide

This guide provides detailed steps for installing MySQL on Windows and macOS, including pre-installation requirements and configuration settings. It covers downloading the installer, running the setup, configuring the server, and verifying the installation. Additionally, it includes troubleshooting tips and recommended tools for managing MySQL databases.

Uploaded by

Shri
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views3 pages

MySQL Installation Guide

This guide provides detailed steps for installing MySQL on Windows and macOS, including pre-installation requirements and configuration settings. It covers downloading the installer, running the setup, configuring the server, and verifying the installation. Additionally, it includes troubleshooting tips and recommended tools for managing MySQL databases.

Uploaded by

Shri
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MySQL Installation Guide for Windows

& macOS
1. Pre‑Installation Notes
• Administrator access on your computer is required.

• Have at least 1 GB of free disk space.

• Ensure a stable internet connection for downloading the installer.

• Recommended version: MySQL Community Server 8.x (free and widely supported).

• For Python use, later install the connector using: pip install mysql-connector-python

2. Installing MySQL on Windows 10/11

Step 1: Download Installer


1. Go to [Link]
2. Choose Windows (x86, 64-bit), MySQL Installer MSI:
- Web Installer (~2 MB) downloads components during setup.
- Full Installer (~450 MB) includes all components.
3. Click Download → 'No thanks, just start my download'.

Step 2: Run Installer


• Locate the downloaded .msi file → Right-click → Run as Administrator.
• Allow User Account Control prompt.

Step 3: Choose Setup Type


Choose from the following:
• Developer Default → Recommended for students (includes MySQL Server, Workbench,
connectors).
• Server Only → Minimal installation.
• Custom → Lets you pick components.

Step 4: Check Requirements


Installer will verify required software (like Visual C++ runtime). Click Execute to download
and install missing components.

Step 5: Install Components


Click Execute to install:
• MySQL Server
• MySQL Workbench
• MySQL Shell
• Documentation & Sample Databases (optional)

Step 6: Configure MySQL Server


1. Server Type: Standalone MySQL Server
2. Config Type: Development Computer
3. Connectivity: TCP/IP Port 3306
4. Authentication: Use Strong Password Encryption (recommended)
5. Set a root password and note it down
6. Configure Windows Service → enable Start at System Startup

Step 7: Apply Configuration


Click Execute → Wait for all steps to turn green → Finish.

Step 8: Verify Installation


• Launch MySQL Workbench → Connect to Local instance → Enter root password.
• Run: SELECT VERSION();
• Test Python connection:
import [Link] as mysql
conn = [Link](host='localhost', user='root', password='your_password')
print('Connected!' if conn.is_connected() else 'Failed')

3. Installing MySQL on macOS (Apple Silicon & Intel)

Step 1: Download DMG Installer


1. Visit [Link]
2. Choose macOS 13 (ARM, x86_64) depending on your Mac:
- ARM64 DMG for Apple Silicon (M1/M2)
- x86_64 DMG for Intel Macs
3. Download → 'No thanks, just start my download'.

Step 2: Install MySQL


1. Open the downloaded .dmg → Double-click the .pkg installer
2. Follow on-screen steps → provide Mac admin password
3. Note the temporary root password shown after installation.

Step 3: Start MySQL Server


• Go to System Settings → MySQL (or System Preferences → MySQL on older macOS)
• Click Start MySQL Server
• (Optional) Enable Start MySQL at system startup
Step 4: Configure Root Password
• Open Terminal and run:
sudo /usr/local/mysql/bin/mysql_secure_installation
• Follow prompts to set root password, remove anonymous users, and secure installation.

Step 5: Add MySQL to PATH


• In Terminal:
echo 'export PATH=/usr/local/mysql/bin:$PATH' >> ~/.zshrc
source ~/.zshrc
• Test: mysql --version

Step 6: Verify Connection


• In Terminal:
mysql -u root -p
• Enter password and test with: SELECT VERSION();
• Test Python connection as done in Windows section.

4. Troubleshooting Tips
• Port 3306 already in use: Stop other MySQL/MariaDB services or change port during
configuration.

• Forgot root password: Stop server → run mysqld --skip-grant-tables → reset password
using SQL.

• Workbench cannot connect: Ensure MySQL service is running and firewall allows port
3306.

• Connector fails in Python: Install or update using: pip install mysql-connector-python.

• On macOS M1/M2 architecture errors: Ensure you used ARM64 DMG; alternatively use
Homebrew: brew install mysql.

5. Recommended Tools
• MySQL Workbench – GUI for queries, schema design, and management.

• DBeaver (optional) – Free multi‑DB GUI tool.

• VS Code + SQLTools extension – For quick SQL queries within the editor.

You might also like