Chapter 1: Introduction to MySQL

Introduction to MySQL

Come, sit comfortably! Today we’re starting our MySQL journey from the very beginning. I’ll explain everything slowly, with real-life examples, just like I would in a classroom. No rush, no jargon bombing — only clear understanding.

1. What exactly is MySQL? (In very simple words)

Imagine you own a small kirana (grocery) shop.

Every day you sell many items: rice, dal, soap, biscuits, etc. You need to remember:

  • Which items you have in stock
  • How many packets of each
  • How much you paid the supplier
  • How much you sold them for
  • Who are your regular customers
  • Which customers still owe you money

If you try to keep all this in your head or in 100 different notebooks, you will go mad!

MySQL is like a super-smart, super-organized digital notebook (actually a full software system) that helps you store all this information in an extremely organized way — in tables — and lets you find any information in seconds, even if you have lakhs of records.

Official definition (but in human language):

MySQL is a free and open-source Relational Database Management System (RDBMS).

  • Relational → Data is stored in tables that can be connected/related to each other (like linking “Customers” table with “Orders” table).
  • Database Management System → It’s the software that actually manages (stores, retrieves, updates, deletes, secures) all your data.
  • Open-source → Anyone can download it for free, see its code, modify it, and even sell services around it.

Real-life example companies using MySQL right now (2026):

  • Facebook / Meta (billions of users)
  • YouTube (every comment, like, view is stored in MySQL originally)
  • Twitter / X (used MySQL heavily in early days)
  • Netflix, Spotify, Uber, Airbnb
  • Almost 50% of all websites on the internet (WordPress, Joomla, Drupal, Magento) run on MySQL!

2. History of MySQL (just enough to feel proud when someone asks)

  • 1995 → Two Swedish guys, Michael “Monty” Widenius and David Axmark, created MySQL while working for a company called TCX DataKonsult AB.
  • They named it MySQLMy (Monty’s daughter’s name) + SQL.
  • It became super popular very fast because it was fast, free, and easy.
  • 2008 → Sun Microsystems bought MySQL for ~$1 billion.
  • 2010 → Oracle bought Sun → so Oracle now owns MySQL.
  • Monty and some original developers were not happy with Oracle’s direction → they created a fork called MariaDB (Maria is Monty’s younger daughter’s name!).
  • Today (2026): Both MySQL (by Oracle) and MariaDB (community-driven) are extremely popular. MySQL 8.4 is the current LTS (Long Term Support) version.

3. Key Features of MySQL (Why it became so loved)

  1. Very very fast – especially for reading data (web apps love this)
  2. Free forever (Community Edition)
  3. Easy to install and learn
  4. Works on Windows, Linux, macOS
  5. Huge community – millions of tutorials, answers on Stack Overflow
  6. Very reliable – when using InnoDB storage engine (default since MySQL 5.5)
  7. Scales beautifully – from a small laptop to thousands of servers (Facebook does this!)
  8. Modern features (in MySQL 8+):
    • JSON support
    • Window functions (like RANK(), ROW_NUMBER())
    • Common Table Expressions (WITH clause)
    • Better full-text search
    • Role-based security

4. SQL vs MySQL – The Confusion Cleared Forever!

Question SQL MySQL
What is it? A language A software / database server
Full form Structured Query Language My + SQL (brand name)
Purpose The way we “talk” to databases The actual program that understands SQL
Example Like Hindi language Like a person who speaks Hindi
Who else uses it? PostgreSQL, Oracle, SQL Server, SQLite, MariaDB, etc. Only MySQL (and MariaDB is very similar)
Do you install it? No – you learn it Yes – you download and install MySQL

Real-life analogy:

  • SQL = English language
  • MySQL = A friend who speaks English and keeps all your data for you

You use SQL sentences to give orders to MySQL.

Example:

SQL

This is SQL language. MySQL is the one who actually goes and finds all customers from Mumbai and shows you their name & phone.

5. Why do people still love MySQL so much in 2026?

  1. Popularity → Still in top 3 databases worldwide (DB-Engines ranking)
  2. Performance → Blazing fast for web applications
  3. Scalability → Can handle millions of queries per second (YouTube, Facebook did it)
  4. Ecosystem → Works perfectly with PHP, Python (Django/Flask), Node.js, Java, .NET, etc.
  5. Free & open → No license fees (unlike Oracle or SQL Server Enterprise)
  6. Cloud ready → AWS RDS, Google Cloud SQL, Azure MySQL, DigitalOcean, etc.

6. How to Install MySQL on Your Laptop (3 Easy Ways – 2026)

Way 1: Official MySQL (Best for serious learning)

  1. Go to → https://dev.mysql.com/downloads/
  2. Download MySQL Installer for Windows (or macOS package / Linux repo)
  3. Run installer → Choose Developer Default (includes Server + Workbench + Shell)
  4. Set a strong root password (remember it!)
  5. Finish → You now have:
    • MySQL Server
    • MySQL Workbench (beautiful GUI tool – like VS Code for databases)

Way 2: XAMPP (Super beginner-friendly – especially for web developers)

  1. Download from → https://www.apachefriends.org/
  2. Install → It includes:
    • Apache (web server)
    • MySQL (actually MariaDB – 100% compatible)
    • PHP
    • phpMyAdmin (browser-based tool)
  3. Start XAMPP Control Panel → Click Start on MySQL
  4. Open browser → http://localhost/phpmyadmin → ready!

Way 3: For macOS lovers Use MAMP (similar to XAMPP) or Homebrew:

Bash

7. Connecting to MySQL for the First Time (Hands-on!)

Method 1: Command Line (most powerful way)

Windows / macOS / Linux → Open terminal / command prompt and type:

Bash
  • -u root → username is root (default super admin)
  • -p → will ask for password

Enter the password you set during installation.

If successful, you will see:

text

Now you are inside MySQL! 🎉

Try these commands:

SQL

Method 2: MySQL Workbench (GUI – very beautiful)

  1. Open MySQL Workbench
  2. Click Local instance MySQL80 (or new connection)
  3. Hostname: 127.0.0.1 or localhost
  4. Port: 3306 (default)
  5. Username: root
  6. Password: (the one you set)
  7. Click Test Connection → if green → Connect!

You’ll get a nice interface to write queries, see tables visually, design ER diagrams, etc.

That’s it for Chapter 1! You now know:

  • What MySQL really is
  • Its history
  • Why it’s still king
  • How to install it
  • How to connect to it

Homework for today (very important!) Install MySQL on your laptop using any method above. Open the command line or Workbench. Run SHOW DATABASES; and tell me what you see. (Just write the output here — we’ll continue from there!)

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *