Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free Oracle MySQL 8.0 Database Administrator 1Z0-908 Exam Questions

Last updated: · 13 practice questions with answers and explanations

Page: 1 / 14 Total 140 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Architecture

Skill tested: Assesses InnoDB tablespace placement and data-file configuration for a database workload.

A payment service stores several large InnoDB tables in a dedicated filesystem with its own capacity alerts and backup schedule. The DBA wants each table to have a separate tablespace file in that location, while preserving ordinary InnoDB transaction and recovery behavior. The server currently uses the default InnoDB configuration, and the tables already exist. Which approach best meets the requirement for newly created tables?

Correct Answer: B. Enable `innodb_file_per_table` and configure the server to place the tablespace files in the required location using the supported data-directory or tablespace placement design.
Explanation:

With `innodb_file_per_table` enabled, InnoDB creates a separate tablespace file for each newly created table rather than storing all table data in the shared system tablespace. File placement must be designed using supported tablespace and data-directory arrangements; the option does not relocate existing tables automatically. The redo-log flush setting affects commit durability, undo truncation concerns undo tablespaces, and buffer-pool instances divide memory structures rather than control data-file placement.

Question 2

New Multiple answers

Topic: Architecture

Skill tested: Evaluates selection of InnoDB buffer-pool and redo-log settings for a write-intensive workload.

A dedicated MySQL 8.0 server runs a write-heavy transactional application. Its InnoDB data set is larger than available RAM, the buffer pool is already sized to avoid operating-system swapping, and monitoring shows frequent checkpoint pressure during sustained bursts. The business requires durable commits and cannot accept weakening crash-recovery guarantees. Which TWO actions are most appropriate to investigate? Select TWO.

Correct Answer: C. Review checkpoint and flushing behavior, including whether the configured redo-log capacity is adequate for the workload.; D. Increase the InnoDB redo-log capacity, subject to available disk space and recovery-time requirements.
Explanation:

Checkpoint pressure during bursts can indicate that redo capacity and flushing behavior need review. Increasing redo-log capacity can give InnoDB more room between checkpoints, but it consumes disk and may affect crash-recovery time; monitoring should guide the change. Setting `innodb_flush_log_at_trx_commit=0` weakens durability, contrary to the stated requirement. Shrinking an appropriately sized buffer pool without evidence may harm caching, and disabling doublewrite protection trades away protection against partial page writes rather than addressing redo capacity safely.

Question 3

New Single answer

Topic: Server Installation and Configuration

Skill tested: Assesses safe option-file configuration and startup verification for MySQL server instances.

A DBA must run a second MySQL 8.0 instance on a Linux host for a staging application. The production server must remain untouched, and the staging instance needs a distinct data directory, TCP port, and Unix socket. Both servers are started by systemd. Which deployment approach is most appropriate?

Correct Answer: A. Create a separate option-file group and service configuration for the staging instance, assigning distinct data directory, port, socket, and PID file, then initialize its data directory before startup.
Explanation:

A second server needs its own initialized data directory and unique runtime endpoints and files. A separate option-file group and service unit let systemd start the intended configuration without changing production settings. Two `mysqld` processes must not share a data directory, even if they have different ports or server IDs. Changing global configuration and restarting production violates the isolation requirement, while a client-selected socket cannot make two servers safely share the same underlying database files.

Question 4

New Multiple answers

Topic: Security

Skill tested: Assesses least-privilege role design and secure account authentication for application access.

A company is deploying a reporting application that should read selected reporting tables but must not modify data or create objects. The application connects over TCP from a separate application subnet, and policy requires individual service-account credentials rather than shared human accounts. Administrators also need a role that can be granted consistently to replacement service accounts. Which TWO measures best satisfy these requirements? Select TWO.

Correct Answer: C. Create a role with `SELECT` privileges limited to the required schema or tables, then grant that role to the service account.; D. Create a dedicated account restricted by an appropriate host pattern, use a strong supported authentication method, and require encrypted transport.
Explanation:

A role centralizes the minimum required read privileges and can be granted to the dedicated service account. Restricting the account's host scope, using strong authentication, and requiring TLS protect the network connection and credentials. Broad database privileges and `SUPER` exceed the application's needs and increase impact if compromised. Using `root` for application traffic defeats separation of duties and least privilege; password rotation does not make that design appropriate.

Question 5

New Single answer

Topic: Monitoring and Maintenance

Skill tested: Evaluates diagnosis of blocking transactions using MySQL lock instrumentation.

Users report intermittent delays on an InnoDB order table. The application team suspects row-lock contention, but the DBA does not want to kill sessions based only on long query time because some transactions are legitimate. The server exposes Performance Schema, and the incident is still active. What is the best first diagnostic action?

Correct Answer: D. Inspect `performance_schema.data_lock_waits` together with `data_locks` and the associated thread or transaction details to identify blockers and waiters.
Explanation:

Performance Schema's InnoDB lock tables expose current lock waits and the locks involved, allowing the DBA to correlate waiting and blocking transactions before taking action. This supports evidence-based diagnosis and avoids terminating legitimate work. Disabling deadlock detection does not identify the blocker and can worsen stalls. Increasing idle-session timeout is unrelated to active lock waits, while restarting destroys the live evidence and disrupts the service.

Question 6

New Multiple answers

Topic: Query Optimization

Skill tested: Assesses use of execution plans and composite-index design for selective query predicates.

A customer-facing query filters `orders` by `customer_id` and `status`, then returns the newest matching rows ordered by `created_at`, with a small `LIMIT`. The table has separate single-column indexes on all three fields, but performance remains poor. The workload runs on MySQL 8.0, and the DBA wants evidence before adding an index. Which TWO steps are most appropriate? Select TWO.

Correct Answer: A. Use `EXPLAIN` or `EXPLAIN ANALYZE` on a representative query to examine access methods, row estimates or actual rows, and ordering work.; E. Create a composite index beginning with the equality-filter columns and including `created_at` in an order suitable for the query, then validate its effect.
Explanation:

An execution plan establishes whether the query scans too many rows, performs extra sorting, or fails to use a useful access path. For equality predicates followed by ordering, a composite index arranged around the filter columns and `created_at` may support both filtering and ordered retrieval; the actual plan and workload should validate the design. Separate indexes are not guaranteed to be merged optimally, and indexing every output column can add cost without solving the access pattern. Changing the primary key or disabling optimization is unjustified.

Question 7

New Single answer

Topic: Backups and Recovery

Skill tested: Assesses point-in-time recovery planning using a full backup and binary logs.

A financial system requires recovery to a specific point shortly before an accidental deletion. The organization has a recent consistent full backup and has retained binary logs from the backup time through the incident. It cannot restore individual rows from an unverified copy of the live data directory. Which recovery plan is most appropriate?

Correct Answer: B. Restore the full backup to a recovery instance, then replay the required binary logs only up to the time or event immediately before the deletion.
Explanation:

Point-in-time recovery combines a known-good backup with binary-log events replayed to a chosen boundary. Restoring to an isolated recovery instance allows validation before any production cutover and avoids applying the destructive event. Replaying beyond the deletion would reproduce it. Copying live data files is not a safe table-level recovery method, and a logical dump of the already changed database cannot recover deleted content.

Question 8

New Multiple answers

Topic: High Availability Techniques

Skill tested: Evaluates Group Replication quorum behavior and safe recovery of an unavailable member.

A three-member InnoDB cluster uses Group Replication in single-primary mode. One member becomes unreachable, while the other two remain connected and continue serving writes. The failed member returns after a network repair, but its data may be behind. The operations team must avoid creating a separate writable group and wants the member to rejoin safely. Which TWO actions are appropriate? Select TWO.

Correct Answer: B. Use the InnoDB Cluster administration workflow to rejoin the member and select an appropriate recovery method, such as incremental recovery or clone where required.; D. Confirm that the surviving group remains a quorum and inspect the returning member's state and error log before recovery.
Explanation:

Two of three members provide a majority, so the existing group can continue operating. Before rejoining, the DBA should assess the returning instance and use the cluster management workflow, which determines whether missing transactions can be recovered incrementally or a full clone is needed. Bootstrapping the isolated member risks forming a separate group, and manually editing internal metadata is unsafe. Network reachability alone does not establish that the member has caught up or is ready for promotion.

Question 9

New Single answer

Topic: Architecture

Skill tested: Assesses client connection configuration and secure transport requirements for MySQL.

An application connects to a MySQL server across an untrusted network. The server accepts TCP connections, and the security policy requires encryption and verification that clients reached the intended server, not merely encryption without identity checking. The application already has the organization's trusted CA certificate available. Which client connection configuration best satisfies the policy?

Correct Answer: D. Use TCP with `--ssl-mode=VERIFY_IDENTITY` and configure the trusted CA certificate.
Explanation:

`VERIFY_IDENTITY` requires TLS and verifies the server certificate identity against the server name, while the configured CA establishes trust in the certificate chain. `REQUIRED` encrypts the connection but does not provide the same identity verification. A Unix socket is local to a host and cannot connect to a remote server, and a password does not protect credentials or data in transit when TLS is disabled.

Question 10

New Single answer

Topic: Server Installation and Configuration

Skill tested: Assesses correct MySQL option-file precedence and verification of active server variables.

A server administrator adds `max_connections=600` to a MySQL option file, but the running instance still reports a lower value. The service is started with a systemd unit that supplies an additional defaults file, and the DBA is prohibited from restarting production until a maintenance window. What should the DBA do next to identify the cause and plan a safe change?

Correct Answer: A. Check the running value and source using Performance Schema variable metadata, and inspect the service command line and option-file loading order for overrides.
Explanation:

The running value may be affected by command-line arguments, an alternate defaults file, option-file group selection, or later settings. Inspecting active variable metadata and the systemd invocation identifies the effective source without disrupting production. A global runtime change may take effect dynamically but does not by itself persist across restart, so it is not the right diagnostic step. Removing configuration files risks unrelated settings, and clients cannot override the server's connection limit.

Question 11

New Multiple answers

Topic: Security

Skill tested: Evaluates protection against SQL injection through parameterized statements and privilege separation.

A web application builds a search query from user-supplied text. Security review found that the code concatenates this value into SQL, and the application account currently has privileges to update several unrelated schemas. The team can modify application code but must keep the existing search feature and avoid relying on input filtering as the sole defense. Which TWO changes provide the strongest improvement? Select TWO.

Correct Answer: C. Use prepared statements with bound parameters for the user-supplied search value.; D. Reduce the application account's privileges to only the objects and operations the application requires.
Explanation:

Prepared statements keep user data separate from SQL syntax, directly addressing injection through concatenated input. Least-privilege grants limit the consequences of any application flaw and should restrict access to required objects and operations. Escaping alone is fragile and does not remedy excessive permissions. Binary logging does not prevent injection, and `FILE` is a powerful unrelated privilege that increases risk rather than validating parameters.

Question 12

New Single answer

Topic: Monitoring and Maintenance

Skill tested: Assesses configuration and interpretation of MySQL slow-query logging for workload analysis.

A DBA is investigating sporadic API latency and needs to identify statements whose execution time exceeds an operational threshold, including statements that use indexes but still run slowly. The team wants to collect evidence for a bounded diagnostic period without changing application SQL. Which logging approach is most appropriate?

Correct Answer: A. Enable the slow query log and configure an appropriate `long_query_time`, then review captured statements and relevant execution context.
Explanation:

The slow query log is designed to capture statements that meet the configured execution-time threshold, regardless of whether they use an index. It can provide evidence for a controlled diagnostic interval, with log volume and sensitivity considered. The general query log records client statements broadly rather than filtering by latency and can create substantial overhead. The error log is not a slow-statement trace, while the no-index option targets a different condition and does not capture all slow queries.

Question 13

New Multiple answers

Topic: Query Optimization

Skill tested: Assesses interpretation of index statistics and validation of index usefulness in MySQL 8.0.

A reporting query has become slower after significant data growth. Its plan chooses a full table scan even though an index appears to match the filter. The table was recently bulk-loaded, and the workload has changed; the DBA wants to distinguish stale estimates from a genuinely unsuitable index before rewriting the query. Which TWO steps are most appropriate? Select TWO.

Correct Answer: A. Refresh table/index statistics with `ANALYZE TABLE`, then reevaluate the plan and workload.; E. Inspect the execution plan and compare estimated access and row counts with the query's actual behavior where practical.
Explanation:

A plan review helps determine why the optimizer estimates a scan to be cheaper and whether the index matches the predicates and required ordering. After a large load or distribution change, `ANALYZE TABLE` can refresh statistics used for cardinality estimates; the plan should then be reassessed under representative conditions. Forcing an index without evidence can make performance worse, and indexes do not need to be named in SQL to be used. A global sort-buffer change does not correct stale selectivity estimates.