MySQL Tutorial
MySQL is a free, open-source relational database system. It stores data in tables and you work with it using SQL.
MySQL runs behind a huge number of websites, including most WordPress sites, many PHP and Laravel apps, and plenty of Node.js projects. If you build websites for clients in Pakistan or abroad, you will meet MySQL very soon.
Why Learn MySQL?
- It is free, fast and works on Windows, macOS and Linux
- Almost every web hosting company offers it, often with phpMyAdmin
- It works with every popular language: PHP, Node.js, Python, Java
- Many jobs and freelance projects ask for it by name
A Small Shop Database
This tutorial builds a database for a small shop in Karachi, with a products table and an orders table.
Example
SELECT name, price
FROM products
WHERE category = 'Grocery'
ORDER BY price DESC;+------------------+---------+ | name | price | +------------------+---------+ | Basmati Rice 5kg | 2450.00 | | Tea 950g | 1650.00 | | Cooking Oil 1L | 620.00 | +------------------+---------+ 3 rows in set (0.00 sec)
What You Will Learn
- What MySQL is and how to install and connect to it
- Creating databases, tables and choosing the right data types
- Inserting, reading, updating and deleting data the MySQL way
- Useful MySQL functions for text, numbers and dates
- Indexes, views and transactions for real applications
New to SQL itself? Start with the SQL tutorial, which explains SELECT, WHERE, joins and GROUP BY step by step. This tutorial focuses on what is special about MySQL.
Exercises and Quiz
Each lesson ends with an exercise, and the last lesson has a quiz.
Exercise
What kind of database is MySQL?
What to Learn After MySQL
Connect MySQL to a back-end language such as PHP or Node.js. To compare it with other databases, see PostgreSQL and MongoDB.
Want to learn with a teacher? The Workownix Full Stack Web Development course covers databases and back-end development with real projects, online or at our institute in Orangi Town, Karachi.
