Wiki
MySQL
Notes, guides and references – 30 entries in 5 categories.
- MySQL Backup and Restore Backing up MySQL and MariaDB on Linux with mysqldump, automating backups with cron, restoring databases, point-in-time recovery with binary logs, and physical backup tools for large databases.
- MySQL Basics: INSERT, SELECT, UPDATE and DELETE Adding, reading, changing and deleting rows in MySQL: INSERT (including upserts), SELECT with WHERE, ORDER BY and LIMIT, UPDATE and DELETE – and how to avoid accidental mass changes.
- MySQL Configuration, Logs and Troubleshooting Where MySQL reads its configuration on Linux, the most important server settings, viewing and changing variables, monitoring with the processlist and status counters, the logs, and fixes for common errors.
- MySQL Databases, Tables and Data Types Creating databases with the right character set, designing tables with keys and constraints, choosing data types, and changing or removing tables with ALTER and DROP.
- MySQL Indexes and Query Performance How indexes work in MySQL, which columns to index, composite indexes and the leftmost-prefix rule, reading EXPLAIN output, and finding slow queries with the slow query log.
- MySQL Joins, Grouping and Subqueries Combining tables with INNER and LEFT JOIN, summarising data with GROUP BY, aggregate functions and HAVING, and using subqueries, CTEs and window functions in MySQL.
- MySQL on Linux: Installation and First Steps Installing MySQL or MariaDB on Debian, Ubuntu and RHEL-based Linux, managing the service with systemctl, securing the installation and logging in for the first time.
- MySQL Transactions and InnoDB What transactions are, how to use START TRANSACTION, COMMIT and ROLLBACK, autocommit, isolation levels, row locks, deadlocks, and why InnoDB is the storage engine to use.
- MySQL Users, Privileges and Security Creating MySQL users, granting and revoking privileges, roles, password changes, safe remote access with bind-address, firewall and TLS, and a security checklist for Linux servers.
- The mysql Command-Line Client Connecting with the mysql client, storing credentials safely, the most useful client commands, running SQL files and using mysql in shell scripts.