1Z0-908 OCP MySQL 8.0 Database Administrator Practice Questions
Prepare for 1Z0-908 with more than an answer.
Unlock the full exam and previous versions
- v1Version 1 206 questions Current
- 1z0-888Legacy MySQL 5.7 Database Administrator 152 questions Locked
- Exam fee
- $245 USD
- Level
- Professional
- Valid for
- Does not expire (but continuing education recommended)
Domains covered on the exam 7
- Architecture14%
- Server Installation and Configuration14%
- Security22%
- Monitoring and Maintenance14%
- Query Optimization12%
- Backups and Recovery12%
- High Availability Techniques12%
- 1
You are configuring a new user account for an automated application that only needs to execute stored procedures within a specific database,
app_db. The application should not have any other privileges. Which TWO grants would achieve this following the principle of least privilege? (Select TWO).Show answer details
Correct answer: A, B
The
USAGEprivilege is the minimum required privilege to allow a user to connect to the database. It grants no other permissions and is the correct starting point.This grant specifically allows the user to execute all stored procedures within the
app_dbdatabase, which directly matches the requirement without granting excessive permissions. - 2
You need to perform an in-place upgrade of a MySQL 5.7 instance to 8.0. Before starting the MySQL 8.0 binary, what is the most critical preparatory step to ensure the upgrade process is as smooth as possible?
Show answer details
Correct answer: A
The MySQL 8.0
mysqlcheckutility (or the dedicatedmysqlshupgrade checker) should be run against the 5.7 server before the upgrade. It checks for incompatibilities such as removed functions, reserved keywords, or outdated data types that will cause the upgrade to fail. This proactive check is the most important preparatory step. - 3
An administrator is setting up multisource replication where a single replica server will aggregate data from two different source servers (Source A and Source B). The administrator has successfully configured the channel for Source A. Which command is used to configure the connection details for the second source, Source B?
Show answer details
Correct answer: B
For multisource replication, each source requires a unique channel name. The
FOR CHANNELclause is used withCHANGE REPLICATION SOURCE TO(or the olderCHANGE MASTER TO) to specify the connection parameters for a specific, named channel, allowing the replica to maintain separate replication streams. - 4
You are troubleshooting a deadlock issue in a high-concurrency application. You have enabled the
innodb_status_outputandinnodb_status_output_locksvariables to get detailed information in the error log. After capturing a deadlock event, you examine theLATEST DETECTED DEADLOCKsection. What information is most crucial for identifying the root cause of the deadlock?Show answer details
Correct answer: C
The deadlock analysis requires understanding the cyclic dependency. The log shows which transaction holds which lock (e.g.,
TRANSACTION 1 holds lock X) and which lock it is waiting for (e.g.,waits for lock Y), while the other transaction holds Y and waits for X. This information, combined with the SQL statements, allows the DBA to identify the conflicting access pattern in the application code. - 5
A DBA is performing a health check on a production MySQL 8.0 server. They want to identify any indexes that have not been used since the last server restart or statistics reset to reclaim storage space and reduce maintenance overhead.
Which
performance_schematable should be queried to find this information?flowchart TD Start([Start]) --> Query{Query P_S Table} Query --> |Find Unused Indexes| Analyze[Analyze Impact] Analyze --> Drop[Drop Unused Index] Query --> |No Unused Indexes| Monitor[Continue Monitoring] Drop --> Monitor Monitor --> End([End])Show answer details
Correct answer: C
The
performance_schema.table_io_waits_summary_by_index_usagetable aggregates I/O wait events, broken down by table and index. An index that does not appear in this table or has all of its count columns as zero (e.g.,COUNT_FETCH,COUNT_INSERT, etc.) has not been used for I/O operations, indicating it is a strong candidate for being dropped. Thesysschema provides a simplified view on this table calledschema_unused_indexes. - 6
A financial services company is deploying a new MySQL 8.0 instance that will store sensitive client data. A security audit mandates that all data, including temporary data created by complex queries and data being replicated, must be encrypted at rest. Which configuration settings are required to meet this strict mandate?
Show answer details
Correct answer: A, B, C
This setting ensures that any newly created schemas and tables within them inherit the encryption attribute, enforcing the policy for new objects.
A keyring plugin is a prerequisite for MySQL data-at-rest encryption. It manages the master encryption key, without which encryption cannot be enabled.
The mandate requires all data at rest to be encrypted. This includes binary logs (replication data) and redo logs (transactional recovery data), which are encrypted by these specific settings.
- 7
A database administrator is tasked with setting up a new three-node InnoDB Cluster in single-primary mode. The goal is to ensure that if the primary node fails, one of the secondary nodes is automatically promoted to primary. Which component is responsible for managing this automatic failover process?
Show answer details
Correct answer: C
The Group Replication plugin, which underpins InnoDB Cluster, is responsible for managing group membership, detecting failures, and running the election process to automatically promote a new primary node when the current one fails. This is a core feature of its distributed consensus mechanism.
- 8
During a performance audit, you discover that a critical reporting query is performing poorly. You run
EXPLAINand notice that the optimizer is choosing a suboptimal index. You have determined that forcing the use of a specific index,idx_report_date, will significantly improve performance. What is the most effective way to instruct the optimizer to use this specific index for the query without making permanent schema changes?Show answer details
Correct answer: A
The
FORCE INDEXhint is the most direct way to instruct the MySQL optimizer to use a specific index if it is at all possible. It is stronger thanUSE INDEX, as it tells the optimizer to consider a full table scan as very expensive, thus heavily favoring the specified index. - 9
A junior DBA is attempting to restore a large database from a logical backup created with
mysqldump. The restore process is taking an exceptionally long time. The backup file contains both schema definitions and data, and the target tables use the InnoDB storage engine. Which of the following is the MOST likely cause of the slow restore speed?Show answer details
Correct answer: B
When
autocommitis enabled (the default), eachINSERTstatement in the dump file is treated as a separate transaction, causing a log flush to disk for every single row. This creates massive I/O overhead. Disabling autocommit and wrapping the data load in a single transaction dramatically improves performance. - 10
You are managing a MySQL 8.0 server where multiple development teams share the same instance. To simplify permissions management, you have created roles such as
dev_read,dev_write, anddev_dba. A developer, 'sara'@'localhost', has been granted thedev_writerole. After connecting, Sara reports that she is unable to modify data. You have verified her grant withSHOW GRANTS FOR 'sara'@'localhost';which showsGRANT 'dev_write' TO 'sara'@'localhost'. What is the most likely reason for this issue?Show answer details
Correct answer: B
In MySQL 8.0, granted roles are not automatically activated upon login unless they are set as a default role for that user (
SET DEFAULT ROLE ...). If it's not a default role, the user must manually activate it in their session usingSET ROLE 'dev_write';to gain its privileges.
