Study guide · Core notes

MySQL DBA Professional core notes

Reference notes for 1Z0-918. Each section names the object, and what you check on a MySQL instance you are allowed to drop.

Reviewed November 19, 2026Seven topic areasEditorial practice weights only

How to read these notes: These notes organize MySQL DBA tasks into seven editorial study areas using Oracle product documentation. Items tagged Extra add broader job context; that tag does not make a claim about official exam scope. New to the exam? Start with the overview. Practice on a server you can remove. The percentages below are editorial study weights, not verified Oracle domain weights.

Architecture, storage, and InnoDB

Editorial 14 percent. Client/server layout, buffer pool, redo/undo, tablespaces.

Client and SQL layer

Clients connect to mysqld. The server parses SQL, optimizes plans, and calls storage engines. InnoDB is the default transactional engine for general tables.

Buffer pool and pages

The buffer pool caches InnoDB data and index pages in memory. Secondary index lookups often fetch the clustered primary-key row afterward unless the index covers the query.

Redo, undo, doublewrite

Redo protects committed changes for crash recovery. Undo supports MVCC and rollback; long transactions inflate history list length. Doublewrite helps against torn page writes.

Tablespaces

With innodb_file_per_table, tables typically live in dedicated .ibd files. MySQL 8-line servers use a transactional data dictionary instead of classic .frm metadata for InnoDB tables. Extra The old query cache is gone in MySQL 8.

Install, startup, configuration, upgrade

Editorial 14 percent. Initialize, option files, multi-instance, upgrades.

Initialize and start

mysqld --initialize creates a data directory. Packages often start the service with systemctl. Watch the error log when startup fails.

Option files and datadir

Primary options commonly live in /etc/my.cnf or /etc/mysql/. datadir holds databases and InnoDB files. Separate instances need distinct port, socket, datadir, and server_id.

Runtime variables

SET GLOBAL changes dynamic variables. SET PERSIST can survive restart when supported. Confirm whether a variable is dynamic before planning a restart.

Upgrades and copies

Read upgrade notes, take a verified backup, then upgrade. Copied datadirs need correct ownership, recovery, and unique server_uuid/server_id before clients connect.

Security, auth, encryption, firewall

Editorial 15 percent. Accounts, least privilege, TLS, FILE, audit.

Users and grants

CREATE USER defines accounts. GRANT assigns privileges. Roles group privileges. caching_sha2_password is the common MySQL 8 default authentication plugin. Prefer SQL account statements over hand-editing grant tables; FLUSH PRIVILEGES reloads after manual edits.

TLS and transport

ALTER USER ... REQUIRE SSL (or X509 options) can force TLS per account. require_secure_transport can enforce server-wide secure connections.

FILE and secure_file_priv

FILE privilege is powerful. secure_file_priv limits LOAD DATA / SELECT ... INTO OUTFILE directories when set.

Encryption, audit, firewall

Tablespace encryption uses a keyring and key process. Audit plugins record activity. MySQL Enterprise Firewall can allow or block SQL patterns. Extra Store app passwords in a secret manager, not a public repo.

Worked security: least-privilege app user

Create an account limited to one schema, then require TLS:

CREATE USER 'app'@'%' IDENTIFIED BY 'strong_password';

GRANT SELECT, INSERT, UPDATE, DELETE ON appdb.* TO 'app'@'%';

ALTER USER 'app'@'%' REQUIRE SSL;

Do not grant SUPER or SHUTDOWN to application pools. Rotate credentials after a leak and revoke unused host patterns.

Monitoring and stability

Editorial 14 percent. Performance Schema, status, slow log, capacity.

Performance Schema and sys

Performance Schema instruments waits, stages, and statements. The sys schema offers readable views. Statement digests summarize expensive shapes.

Status and processlist

SHOW GLOBAL STATUS and SHOW PROCESSLIST (or performance_schema threads) show counters and active sessions. Compare Threads_connected to max_connections.

Slow and general logs

The slow query log captures statements over long_query_time. The general log records nearly everything and is costly on busy hosts.

InnoDB health signals

History list length, handler read counters, error-log recovery messages, and binary log disk growth are classic stability checks. Handler_read_rnd_next often signals table scans; Handler_read_next tracks index-order reads. Check plans before diagnosing from counters alone. Extra Prefer selective instruments over unbounded general logging.

Query optimization and indexes

Editorial 14 percent. EXPLAIN, composite keys, statistics.

EXPLAIN

EXPLAIN shows access type, key, and estimated rows. EXPLAIN ANALYZE executes supported statements and reports actual timing. Use it carefully on writes and production.

Index design

Composite indexes should match equality filters then ordering. Covering indexes avoid base-row lookups. Leading LIKE wildcards defeat ordinary B-tree prefixes.

Statistics

ANALYZE TABLE refreshes optimizer statistics after bulk loads. Low selectivity can cause the optimizer to skip an index.

Temporary tables and sorts

filesort and on-disk temporary tables hint missing order support or insufficient sort/group buffers. Measure before raising buffers blindly.

Backup and recovery

Editorial 14 percent. mysqldump, MEB, binary logs, PITR.

Logical dumps

mysqldump writes SQL. --single-transaction gives a consistent InnoDB read view, but not a consistent snapshot of nontransactional tables; concurrent DDL can invalidate a dump. Restore by executing SQL with the mysql client.

Physical backups

MySQL Enterprise Backup and similar tools copy files for large, fast restores. Coordinate with InnoDB; ad-hoc copies without redo awareness risk inconsistency.

Binary logs and PITR

Binary logs enable point-in-time recovery after a base backup. FLUSH BINARY LOGS rotates files. PURGE BINARY LOGS only after replicas and recovery windows no longer need them.

Verify restores

A backup is not trusted until a restore drill succeeds. Record a consistent replication start point when provisioning replicas. mysqldump --source-data records binary log file and position; check GTID metadata separately.

High availability and replication

Editorial 15 percent. Async replication, GTID, Group Replication, InnoDB Cluster.

Async replication

The I/O thread fetches binary log events; the SQL applier executes them. CHANGE REPLICATION SOURCE TO (or legacy CHANGE MASTER TO) points the replica. read_only reduces accidental local writes.

GTID and lag

GTIDs uniquely identify transactions for auto-positioning and failover. Seconds_Behind_Source estimates lag with caveats. Semisync waits for relay-log receipt, not replica apply, and can fall back to async after a timeout.

InnoDB Cluster

Group Replication provides membership and conflict detection. MySQL Shell administers the set. MySQL Router routes clients. Group Replication needs a voting majority: three members are needed to tolerate one failure; Router does not vote. Recover expelled members with documented rejoin or clone procedures.

Rebuild and promote

On promotion, keep GTID sets consistent and server identities unique. Rebuild drifted replicas from a verified backup or clone, then start replication at recorded coordinates. Extra Never force writes on every partitioned node during a split.

Worked cases: diagnose a symptom and prove a recovery

Use an isolated MySQL 8.0 learning instance for these scenarios. Record the storage engine, transaction settings, and server version before interpreting results. An observation from another engine or a different configuration may not support the same conclusion.

A slow request may be waiting, not computing

An application update usually completes quickly but occasionally takes thirty seconds. Begin by distinguishing execution work from lock waiting. Inspect current statements and relevant Performance Schema lock information, then identify the blocking transaction and its owner. An apparently idle application connection can still hold an open transaction. Adding an index is not automatically the right fix for a transaction that holds locks while waiting for a remote service.

In a lab, let session A update a single indexed row without committing. Have session B update the same row. Observe the wait, then commit or roll back session A and observe session B. Repeat with a deliberately longer transaction and explain the effect. For production reasoning, assess the consequence before terminating a session: rollback can take time, and interrupted work may need application recovery.

Use a transaction boundary that matches the operation

A transfer between two balances needs both changes to succeed together. Use an InnoDB transaction, validate business conditions, and commit only after the required work succeeds. If rows must be read before updating, an appropriate locking read can protect the decision. A plain consistent read and a locking read do different jobs. Keep the transaction short and access shared resources in a consistent order to reduce deadlock risk.

Deadlocks can still occur in a correct concurrent system. The application should handle the database error and retry the logical transaction when appropriate. Retrying just the last SQL statement may ignore earlier work that was rolled back. Also distinguish a deadlock from a lock-wait timeout; do not assume every timeout rolls back the complete transaction under every configuration.

Evaluate an index against the actual query

Suppose a query filters by customer identifier and status, then sorts recent orders by date. Propose an index based on those predicates and ordering, then inspect the plan and test representative data. A table with twenty rows may not reveal the behavior of a large, skewed production table. Compare examined rows, elapsed time, and write overhead rather than declaring success because the plan mentions an index.

Additional indexes consume storage and must be maintained during writes. A covering index can reduce table lookups but may be unnecessarily wide. Check other queries before removing an apparently redundant index, and evaluate changes with an observable rollback plan. Statistics and selectivity influence the optimizer; forcing a plan without understanding the cause may preserve a fragile assumption.

Distinguish high availability from recovery

A replica can improve availability, but it can also receive an accidental deletion. Replication is therefore not a substitute for a recovery history. For point-in-time recovery, restore a suitable backup and replay the required binary-log events up to a deliberately chosen boundary. Preserve the relationship between the backup and the log position or transaction history used for replay. Avoid replaying the damaging transaction merely because it is the newest event available.

Test the process on an isolated server with known marker rows and a simulated mistake. Verify data, users and privileges needed by the application, and the application's ability to reconnect. Record how long restoration takes and what data is missing at the selected target. Promotion of a replica also needs protection against two writable primaries; recovering data and safely routing traffic are separate checks.

Technical references: InnoDB locking reads and MySQL point-in-time recovery.

Eight checks on a disposable MySQL instance

Say what you expect to see before you change the data. Then drop the instance if it was only for practice.

A buffer pool fact you can observe

Note innodb_buffer_pool_size, run a large SELECT twice, and compare Innodb_buffer_pool_reads or related status counters.

What to verify: The second pass should hit fewer disk reads when the working set fits. The buffer pool is memory, not the binary log.

A multi-instance conflict you can force

Attempt to start a second mysqld with the same port as a running instance.

What to verify: The second listener fails to bind. Separate port, socket, datadir, and server_id are required for coexistence.

A least-privilege grant that must fail SHUTDOWN

Create an app user with only SELECT on one schema, connect as that user, and attempt an administrative shutdown or super-only operation.

What to verify: Schema SELECT works. Privileged shutdown or SUPER-class operations are denied.

A digest that must surface a hot query

Enable Performance Schema statement consumers as documented, run a repeated slow query, and inspect events_statements_summary_by_digest or a sys view.

What to verify: The normalized digest accumulates count and latency. The general log is not required for this check.

An index plan to compare

Load enough rows for a selective filter, run EXPLAIN, create a composite index matching filter and ORDER BY, and run EXPLAIN again.

What to verify: key, type, and rows estimates improve when the index fits. The optimizer may still choose a scan on tiny tables.

A dump that must restore cleanly

mysqldump a schema with --single-transaction, drop the schema, and reload the dump.

What to verify: Row counts and a spot-check query match the pre-drop state. Untested dumps are not backups.

A replica lag signal you can read

Configure source and replica with GTIDs in a lab, apply a write load, and read SHOW REPLICA STATUS.

What to verify: IO and SQL threads are Yes when healthy. Seconds_Behind_Source moves under load and returns toward zero when caught up.

A binary log rotate for PITR thinking

Note the current binary log file, run FLUSH BINARY LOGS, and list the new file. Sketch restore-plus-mysqlbinlog to a timestamp.

What to verify: A new binlog file appears. PURGE is unsafe until replicas and recovery windows no longer need older files.

Frequently asked questions

Which exam do these notes follow?

These notes follow Oracle exam 1Z0-918 MySQL Database Administration Professional. The seven groups on this site are editorial study areas, not a verified official weighted blueprint. Retired 1Z0-908 is a separate exam code.

What does --single-transaction do for mysqldump?

It starts a consistent InnoDB read view without locking every InnoDB table for the whole dump. Nontransactional tables are outside that guarantee, and concurrent DDL can invalidate the dump.

What is a GTID used for in replication?

A global transaction identifier uniquely labels a committed transaction so replicas can auto-position and fail over without relying only on binary log file and position pairs.

Does EXPLAIN change data on the server?

Ordinary EXPLAIN shows an estimated plan without running the statement. EXPLAIN ANALYZE executes supported statements to measure actual timing, so use it carefully on write statements and production systems.

Continue the MySQL DBA study path

The overview, core notes, flashcards, and practice exams are all published.

MySQL DBA hub →
Available

Overview

Exam format, the seven topic areas, and a lab plan.

Available · You are here

Core Notes

Reference notes for InnoDB, security, backups, and HA.

Available

Practice Exams

200 original questions across the seven topic areas.

Official exam sources

Notes follow the Oracle MyLearn 1Z0-918 exam page and the Oracle Certification catalog. Product behavior is in the MySQL Reference Manual, including mysqldump, semisynchronous replication, and Group Replication fault tolerance.

AWS Data Engineer

An AWS data pipeline exam. It is not the Oracle MySQL DBA Professional credential.

Apply concepts in the Scenario Workshop →