Oracle MySQL Database Administrator Exam
Verified Questions, Correct Answers, and
Detailed Explanations for Computer Science
Students||Already Graded A+
1. Which MySQL storage engine supports transactions?
A) MyISAM
B) MEMORY
C) InnoDB
D) CSV
InnoDB supports ACID-compliant transactions, whereas MyISAM and other
engines do not.
2. What is the default port number for MySQL?
A) 8080
B) 1521
C) 3306
D) 1433
3306 is the default TCP port for MySQL connections.
3. Which command is used to start the MySQL server on Linux?
A) mysql start
B) systemctl start mysqld
C) service mysql stop
D) mysqld shutdown
The systemctl start mysqld command initiates the MySQL server on systemd-
based Linux systems.
4. Which SQL statement is used to remove a table from the database?
A) DELETE TABLE table_name;
B) DROP TABLE table_name;
C) REMOVE table_name;
D) TRUNCATE TABLE table_name;
DROP TABLE deletes the table structure and data permanently.
5. What is the primary purpose of the EXPLAIN statement in MySQL?
A) Show triggers
B) Show users
,C) Provide query execution plan
D) List indexes
EXPLAIN helps DBAs analyze how MySQL executes queries for optimization.
6. Which MySQL user privilege allows creating databases?
A) SELECT
B) INSERT
C) CREATE
D) DELETE
The CREATE privilege permits the user to create new databases or tables.
7. How do you display all databases in MySQL?
A) SHOW TABLES;
B) SHOW DATABASES;
C) LIST DATABASES;
D) SELECT * FROM databases;
SHOW DATABASES lists all accessible databases.
8. What file stores MySQL’s global configuration settings?
A) my.cnf
B) my.ini / my.cnf
C) my.db
D) mysqld.conf
my.cnf (Linux) or my.ini (Windows) contains server configuration options.
9. Which command displays all current MySQL processes?
A) SHOW DATABASES;
B) SHOW PROCESSLIST;
C) SHOW USERS;
D) SHOW TABLES;
SHOW PROCESSLIST shows all active connections and running queries.
10. Which engine is recommended for full-text searches in MySQL?
A) MEMORY
B) InnoDB / MyISAM
C) CSV
D) ARCHIVE
MyISAM historically supported full-text indexes; InnoDB now also supports full-
text indexing.
, 11. Which command is used to backup a MySQL database?
A) mysqldump
B) mysqldump
C) mysqlbackup
D) dbexport
mysqldump exports databases into SQL scripts for backup.
12. How do you change a user’s password in MySQL 8.0?
A) SET PASSWORD FOR 'user';
B) ALTER USER 'user'@'host' IDENTIFIED BY 'new_password';
C) UPDATE mysql.user SET password='...';
D) CHANGE PASSWORD;
ALTER USER is the preferred way to change passwords in MySQL 8.
13. Which statement checks for referential integrity constraints?
A) SHOW TABLES;
B) SHOW CREATE TABLE table_name;
C) SELECT * FROM constraints;
D) EXPLAIN table_name;
SHOW CREATE TABLE displays table definitions including foreign key
constraints.
14. Which type of index automatically improves the speed of primary key
lookups?
A) UNIQUE
B) FULLTEXT
C) PRIMARY
D) SPATIAL
Primary keys automatically create a unique clustered index.
15. Which variable sets the maximum number of connections in MySQL?
A) max_users
B) max_connections
C) connection_limit
D) max_clients
The max_connections variable defines the maximum concurrent client
connections.
16. Which command removes all rows but keeps the table structure?
A) DROP TABLE
Verified Questions, Correct Answers, and
Detailed Explanations for Computer Science
Students||Already Graded A+
1. Which MySQL storage engine supports transactions?
A) MyISAM
B) MEMORY
C) InnoDB
D) CSV
InnoDB supports ACID-compliant transactions, whereas MyISAM and other
engines do not.
2. What is the default port number for MySQL?
A) 8080
B) 1521
C) 3306
D) 1433
3306 is the default TCP port for MySQL connections.
3. Which command is used to start the MySQL server on Linux?
A) mysql start
B) systemctl start mysqld
C) service mysql stop
D) mysqld shutdown
The systemctl start mysqld command initiates the MySQL server on systemd-
based Linux systems.
4. Which SQL statement is used to remove a table from the database?
A) DELETE TABLE table_name;
B) DROP TABLE table_name;
C) REMOVE table_name;
D) TRUNCATE TABLE table_name;
DROP TABLE deletes the table structure and data permanently.
5. What is the primary purpose of the EXPLAIN statement in MySQL?
A) Show triggers
B) Show users
,C) Provide query execution plan
D) List indexes
EXPLAIN helps DBAs analyze how MySQL executes queries for optimization.
6. Which MySQL user privilege allows creating databases?
A) SELECT
B) INSERT
C) CREATE
D) DELETE
The CREATE privilege permits the user to create new databases or tables.
7. How do you display all databases in MySQL?
A) SHOW TABLES;
B) SHOW DATABASES;
C) LIST DATABASES;
D) SELECT * FROM databases;
SHOW DATABASES lists all accessible databases.
8. What file stores MySQL’s global configuration settings?
A) my.cnf
B) my.ini / my.cnf
C) my.db
D) mysqld.conf
my.cnf (Linux) or my.ini (Windows) contains server configuration options.
9. Which command displays all current MySQL processes?
A) SHOW DATABASES;
B) SHOW PROCESSLIST;
C) SHOW USERS;
D) SHOW TABLES;
SHOW PROCESSLIST shows all active connections and running queries.
10. Which engine is recommended for full-text searches in MySQL?
A) MEMORY
B) InnoDB / MyISAM
C) CSV
D) ARCHIVE
MyISAM historically supported full-text indexes; InnoDB now also supports full-
text indexing.
, 11. Which command is used to backup a MySQL database?
A) mysqldump
B) mysqldump
C) mysqlbackup
D) dbexport
mysqldump exports databases into SQL scripts for backup.
12. How do you change a user’s password in MySQL 8.0?
A) SET PASSWORD FOR 'user';
B) ALTER USER 'user'@'host' IDENTIFIED BY 'new_password';
C) UPDATE mysql.user SET password='...';
D) CHANGE PASSWORD;
ALTER USER is the preferred way to change passwords in MySQL 8.
13. Which statement checks for referential integrity constraints?
A) SHOW TABLES;
B) SHOW CREATE TABLE table_name;
C) SELECT * FROM constraints;
D) EXPLAIN table_name;
SHOW CREATE TABLE displays table definitions including foreign key
constraints.
14. Which type of index automatically improves the speed of primary key
lookups?
A) UNIQUE
B) FULLTEXT
C) PRIMARY
D) SPATIAL
Primary keys automatically create a unique clustered index.
15. Which variable sets the maximum number of connections in MySQL?
A) max_users
B) max_connections
C) connection_limit
D) max_clients
The max_connections variable defines the maximum concurrent client
connections.
16. Which command removes all rows but keeps the table structure?
A) DROP TABLE