Skip to content

You are viewing a free preview of this lesson.

Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.

What is MySQL?

What is MySQL?

MySQL is one of the world's most widely deployed open-source relational database management systems (RDBMS). Originally released in 1995 by MySQL AB, it is now maintained by Oracle Corporation. It underpins countless web applications, SaaS products, and enterprise systems across every industry.

The Relational Model

MySQL is built on the relational model introduced by Edgar F. Codd in 1970. Data is organised into tables of rows and columns, relationships are expressed through primary and foreign keys, and queries are written in Structured Query Language (SQL). This model enforces a consistent, typed schema and supports powerful joins across tables.

Unlike document databases, MySQL requires you to define your schema up front. In return you get strict data integrity guarantees, referential constraints, and the full power of ACID transactions.

MySQL Architecture

MySQL uses a client/server architecture. The server process (mysqld) manages data files, handles connections, parses SQL, and returns results. Clients connect over TCP/IP (or a local Unix socket) using the MySQL protocol. Popular clients include the mysql command-line tool, MySQL Workbench, and application drivers for languages such as Python, Node.js, Java, and PHP.

Internally, MySQL uses a pluggable storage engine layer. The default and most important engine is InnoDB, which provides full ACID transactions, foreign key support, and row-level locking. The older MyISAM engine offers faster reads for non-transactional workloads but lacks foreign keys and crash recovery guarantees.

Common Use Cases

MySQL excels in web application backends, e-commerce platforms, content management systems, financial applications, and analytics pipelines. It is a core component of the classic LAMP stack (Linux, Apache, MySQL, PHP) and is supported by virtually every hosting provider.

MySQL also offers replication (primary/replica), partitioning, and a JSON data type for semi-structured data, making it versatile enough for a wide range of modern workloads.

MySQL vs Other Databases

Feature MySQL PostgreSQL SQLite
License GPL / Commercial PostgreSQL (permissive) Public domain
Transactions InnoDB full ACID Full ACID Serialised ACID
JSON support Yes (5.7+) Advanced (jsonb) Limited
Replication Built-in Built-in Not applicable
Best for Web apps, high read load Complex queries, extensions Embedded, small apps

The MySQL Ecosystem

Oracle distributes MySQL in several editions: Community (free, GPL), Standard, Enterprise, and Cluster. The community edition covers everything needed for production web workloads. MariaDB is a popular community fork that maintains near-full compatibility with MySQL syntax and protocols.

Understanding what MySQL is, how it is architected, and where it excels gives you the foundation for the hands-on lessons ahead.