MySQL Fundamentals
MySQL is a relational database server. Applications send SQL statements to store related records in tables, enforce rules between them, and retrieve the rows they need.
itDatabases and data storage | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic: MySQL Fundamentals
MySQL is the database server that keeps relational facts in tables while applications send it SQL over a connection. That sounds like a filing cabinet with opinions. The opinions matter: it checks accounts and privileges, interprets the statement, chooses a route through the data, and returns rows or a status. Before this arrangement, applications had to manage their own files and relationships. That gave every program a chance to become a tiny, underfunded database project.
The first useful idea is that SQL asks for a result, not a sequence of page reads. A SELECT describes filters, joins, groups, and ordering. The server's optimizer chooses an execution plan, meaning the route it expects to use through tables and indexes. An index is not a decorative speed sticker. It is an ordered access structure that can reduce rows examined, while making writes and storage more expensive. EXPLAIN lets you inspect the plan instead of trying to interpret a query by tea leaves.
The second idea is that a table is more than a grid. A primary key identifies each row, and InnoDB organizes the table around it. A foreign key connects a child value to a parent key so the database can reject a relationship that points nowhere. Constraints are the part of the system that gets to say no before an inconsistent value becomes a future investigation.
The third idea is InnoDB, the default storage engine. It turns those logical tables into rows, indexes, locks, undo records, redo records, and recovery behavior. A transaction groups related changes into one decision. COMMIT makes it durable; ROLLBACK cancels uncommitted work. Concurrent transactions can wait or deadlock, because shared rows have no obligation to cooperate with a busy schedule. InnoDB can roll back one deadlock participant, so the application must retry the complete unit.
This is the surprise: a running server is not automatically a recoverable service. Replication can copy a mistaken delete. Redo supports crash recovery, but it is not a backup. A backup becomes useful only when a restore test proves the files, logs, keys, and procedure work together. Monitoring query latency, lock waits, connection pressure, replication lag, disk growth, and backup outcomes tells different parts of that story.
Read the intro for the full request path and the limits of MySQL. Use the slides when the pieces need to become one map. Keep the cheatsheet nearby for query order, index rules, transaction behavior, and operational signals. Then use the Practice Reference and exercise to make the server reject a bad relationship, reveal a plan, and undo a change. That is when the filing cabinet starts showing its paperwork.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://dev.mysql.com/doc/refman/8.4/en/
Supports
- Current MySQL 8.4 terminology
- feature map
- SQL statements
- administration
- security
- backup
- optimization
- and replication
- https://dev.mysql.com/doc/refman/8.4/en/what-is-mysql.html
Supports
- Client-server relational database definition and architecture
- https://dev.mysql.com/doc/refman/8.4/en/features.html
Supports
- Server
- SQL
- storage-engine
- connector
- security
- and replication capabilities
- https://dev.mysql.com/doc/refman/8.4/en/tutorial.html
Supports
- Connection
- database and table creation
- loading
- retrieval
- filtering
- grouping
- and common query progression
- https://dev.mysql.com/doc/refman/8.4/en/innodb-introduction.html
Supports
- InnoDB default status
- ACID transactions
- row locking
- clustered indexes
- foreign keys
- and crash recovery
- https://dev.mysql.com/doc/refman/8.4/en/optimization-indexes.html
Supports
- Index read benefits and write and storage costs
- https://dev.mysql.com/doc/refman/8.4/en/multiple-column-indexes.html
Supports
- Composite index ordering and leftmost-prefix use
- https://dev.mysql.com/doc/refman/8.4/en/using-explain.html
Supports
- Execution-plan inspection
- indexes
- join order
- and optimizer estimates
- https://dev.mysql.com/doc/refman/8.4/en/create-table-foreign-keys.html
Supports
- Parent and child relationships
- referential consistency
- indexes
- and actions
- https://dev.mysql.com/doc/refman/8.4/en/commit.html
Supports
- Autocommit
- start transaction
- commit
- and rollback behavior
- https://dev.mysql.com/doc/refman/8.4/en/innodb-multi-versioning.html
Supports
- Consistent reads
- undo records
- older row versions
- and purge retention
- https://dev.mysql.com/doc/refman/8.4/en/innodb-deadlocks-handling.html
Supports
- Deadlock causes
- victim rollback
- transaction retry
- short transactions
- and consistent access order
- https://dev.mysql.com/doc/refman/8.4/en/backup-and-recovery.html
Supports
- Logical and physical backups
- binary logs
- point-in-time recovery
- and restore planning
- https://dev.mysql.com/doc/refman/8.4/en/security.html
Supports
- Accounts
- privileges
- authentication
- encrypted connections
- and deployment security
- https://dev.mysql.com/doc/refman/8.4/en/privileges-provided.html
Supports
- Global
- database
- and object privilege scopes
- https://dev.mysql.com/doc/refman/8.4/en/history.html
Supports
- First MySQL release date and project origin
- https://dev.mysql.com/doc/refman/8.0/en/faqs-general.html
Supports
- General-availability dates for MySQL 5.0 through 8.4 and production-series history
- https://dev.mysql.com/doc/refman/5.7/en/mysql-nutshell.html
Supports
- Native JSON type and JSON functions in MySQL 5.7
- https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html
Supports
- Transactional data dictionary
- common table expressions
- and window functions in MySQL 8.0
- https://dev.mysql.com/doc/refman/8.4/en/mysql-releases.html
Supports
- Innovation and LTS release tracks and their start
- https://github.com/sindresorhus/awesome
Supports
- Required discovery starting point and link to the MySQL list
- https://github.com/shlomi-noach/awesome-mysql
Supports
- Discovery of DBeaver
- mycli
- phpMyAdmin
- MySQLTuner
- Percona Toolkit
- and gh-ost
- https://dbeaver.com/docs/dbeaver/Database-driver-MySQL/
Supports
- DBeaver MySQL connections
- objects
- features
- driver settings
- and secure connections
- https://www.mycli.net/
Supports
- Interactive MySQL terminal completion and syntax highlighting
- https://docs.phpmyadmin.net/en/latest/
Supports
- Browser-based MySQL administration
- import
- export
- accounts
- configuration
- and security
- https://github.com/major/MySQLTuner-perl
Supports
- MySQL configuration and status review tool identity and usage
- https://docs.percona.com/percona-toolkit/
Supports
- Command-line tools for query analysis
- schema changes
- replication
- and consistency
- https://github.com/github/gh-ost
Supports
- Binary-log-driven online schema migration and ghost-table cutover
- https://www.mysql.com/products/community/
Supports
- MySQL Community Server Landscape identity and destination
- https://www.mysql.com/products/enterprise/
Supports
- MySQL Enterprise Edition Landscape identity and commercial operational tooling
- https://mariadb.com/docs/release-notes/compatibility-and-differences/mariadb-vs-mysql-compatibility
Supports
- MariaDB and MySQL compatibility boundaries and independent behavior
- https://docs.percona.com/percona-server/8.4/
Supports
- Percona Server for MySQL compatibility
- observability
- and administration
- https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.AuroraMySQL.html
Supports
- Aurora MySQL compatibility
- managed architecture
- replicas
- backups
- and failover
- https://cloud.google.com/sql/docs/mysql
Supports
- Cloud SQL for MySQL provisioning
- connections
- backups
- maintenance
- and availability
- https://learn.microsoft.com/en-us/azure/mysql/
Supports
- Azure Database for MySQL use of Community Edition and managed-service operations
- https://docs.pingcap.com/tidb/stable/mysql-compatibility/
Supports
- TiDB MySQL protocol
- SQL compatibility
- and documented differences
- https://planetscale.com/docs/vitess
Supports
- PlanetScale use of Vitess concepts and MySQL-compatible distributed operation
- https://planet.mysql.com/entry/?id=673965
Supports
- Operational consequences of long-running InnoDB transactions, old read views, delayed undo purge, and history-list growth
