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.
Study guide · 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.
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.
Editorial 14 percent. Client/server layout, buffer pool, redo/undo, tablespaces.
Clients connect to mysqld. The server parses SQL, optimizes plans, and calls storage engines. InnoDB is the default transactional engine for general tables.
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 protects committed changes for crash recovery. Undo supports MVCC and rollback; long transactions inflate history list length. Doublewrite helps against torn page writes.
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.
Editorial 14 percent. Initialize, option files, multi-instance, upgrades.
mysqld --initialize creates a data directory. Packages often start the service with systemctl. Watch the error log when startup fails.
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.
SET GLOBAL changes dynamic variables. SET PERSIST can survive restart when supported. Confirm whether a variable is dynamic before planning a restart.
Read upgrade notes, take a verified backup, then upgrade. Copied datadirs need correct ownership, recovery, and unique server_uuid/server_id before clients connect.
Editorial 15 percent. Accounts, least privilege, TLS, FILE, audit.
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.
ALTER USER ... REQUIRE SSL (or X509 options) can force TLS per account. require_secure_transport can enforce server-wide secure connections.
FILE privilege is powerful. secure_file_priv limits LOAD DATA / SELECT ... INTO OUTFILE directories when set.
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.
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.
Editorial 14 percent. Performance Schema, status, slow log, capacity.
Performance Schema instruments waits, stages, and statements. The sys schema offers readable views. Statement digests summarize expensive shapes.
SHOW GLOBAL STATUS and SHOW PROCESSLIST (or performance_schema threads) show counters and active sessions. Compare Threads_connected to max_connections.
The slow query log captures statements over long_query_time. The general log records nearly everything and is costly on busy hosts.
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.
Editorial 14 percent. EXPLAIN, composite keys, statistics.
EXPLAIN shows access type, key, and estimated rows. EXPLAIN ANALYZE executes supported statements and reports actual timing. Use it carefully on writes and production.
Composite indexes should match equality filters then ordering. Covering indexes avoid base-row lookups. Leading LIKE wildcards defeat ordinary B-tree prefixes.
ANALYZE TABLE refreshes optimizer statistics after bulk loads. Low selectivity can cause the optimizer to skip an index.
filesort and on-disk temporary tables hint missing order support or insufficient sort/group buffers. Measure before raising buffers blindly.
Editorial 14 percent. mysqldump, MEB, binary logs, PITR.
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.
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 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.
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.
Editorial 15 percent. Async replication, GTID, Group Replication, InnoDB Cluster.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Say what you expect to see before you change the data. Then drop the instance if it was only for practice.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
The overview, core notes, flashcards, and practice exams are all published.
Exam format, the seven topic areas, and a lab plan.
Reference notes for InnoDB, security, backups, and HA.
42 recall cards in seven decks, plus memory notes for DBA operations.
200 original questions across the seven topic areas.
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.
DP-900 covers data concepts on Azure. It is not a MySQL DBA certification.
A Google Cloud database exam. Passing either exam does not award the other.
An AWS data pipeline exam. It is not the Oracle MySQL DBA Professional credential.
Oracle Certified Associate exam 1Z0-922. Passing either exam does not award the other.
Certicab provides general informational, educational, and convenience resources. Learning materials can contain errors or become outdated. Check the current exam guide and official documentation before relying on a technical recommendation. Practice only in environments you own or are authorized to use, and do not share credentials or confidential exam material. Study resources are independent and do not guarantee exam success or imply certification-provider endorsement. Oracle, Java, MySQL, and Oracle Cloud are trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Certicab is not affiliated with, endorsed by, or sponsored by Oracle.