Mysql测试题

1 Which Linux MySQL server installation directories are the base directories? (Choose two)

/usr/sbin

/var/lib/mysql

/var/log

/usr/bin

/etc

2 What does the RPM installation process for MySQL do? (Choose two)

It creates the default my.cnf file

It sets up the mysql user and group in the operating system

It creates the default root@localhost account

It provides a temporary password for the root account

It registers system startup scripts for MySQL services

3 What is the purpose of the mysql_config_editor utility? (Choose two)

It reads and replays the contents of binary log files.

It creates TLS keys and certificates.

It reads and summarizes the contents of MySQL slow query log files.

It enables users to store authentication credentials in the .mylogin.cnf file.

4 Which storage engine supports INSERT and SELECT but not DELETE, REPLACE, or UPDATE commands?

ARCHIVE

MyISAM

BLACKHOLE

MEMORY

5 Which features are supported by InnoDB? (Choose two)

Hash indexes

Clustered indexes

B-tree indexes

Cluster database support

T-tree indexes

6 Which are true about the MyISAM storage engine? (Choose three)

It supports table-level locking

It supports all data types except spatial data types

It supports FULLTEXT indexes

It supports spatial data types and indexes

It supports storing row data and indexes in memory

7 Which system variables have both global and session scope in MySQL? (Choose two)

sort_buffer_size

error_count

max_join_size

innodb_buffer_pool_size

max_connections

8 Examine this command which executes successfully: SET PERSIST max_connections=99; Which command displays the content of the file that includes this parameter change?

cat /labs/slap-test-updates.sh

mysql> \! cat /var/lib/mysql/mysqld-auto.cnf | python -m json.tool

mysql> \! cat /var/lib/mysql/slow-query.log

cat /labs/multi.cnf

9 You changed the maximum number of connections in MySQL. In the variable_info table, the max_connections system variable displays a VARIABLE_SOURCE of DYNAMIC. What does it mean?

The max_connections system variable was set from the my.cnf file.

The max_connections system variable has not been configured in any startup file.

The max_connections system variable was changed at runtime.

The max_connections system variable was set from a server-specific mysqld-auto.cnf option file.

10 Examine this command and results: SET GLOBAL port = 3303; ERROR 1238 (HY000): Variable "port" is a read only variable. How would you resolve this error? (Choose two)

Change the port option to dynamic in the my.cnf file.

Change the port option to dynamic at the command line.

Change the default port number in the my.cnf file.

Change the port number in the mysql-auto.cnf file.

Change the modifier from GLOBAL to SESSION in the command.

11 Which command displays collected server metrics stored in the performance schema? 服务器指标(metrics)

SELECT * FROM setup_objects LIMIT 5\G;

SELECT * FROM setup_actors LIMIT 5\G;

SELECT * FROM setup_consumers LIMIT 5\G;

SELECT * FROM setup_instruments LIMIT 5\G;

12 What can be configured by modifying the Performance Schema setup_actors table?

stored procedures that are monitored

server metrics that are collected

foreground threads that are monitored

thread classes that are instrumented

13 Examine this output: | HOST | USER | ROLE | ENABLED | HISTORY | | % | % | % | YES | YES | 1 row in set (#.## sec) Which command produces this?

SELECT * FROM setup_objects LIMIT 5\G;

SELECT * FROM setup_consumers LIMIT 5\G;

SELECT * FROM setup_actors LIMIT 5\G;

SELECT * FROM setup_instruments LIMIT 5\G;

14 Why is the General Query Log used in MySQL? (Choose two)

To record statements where execution time exceeds a specified threshold

To record the time and type of each connection and the process ID of all operations

To discover queries with excessive execution time.

To include update operations stored as row-based binary logs on slave servers

To record all statements executed against all tables

15 Which Performance Schema instruments have no subcomponents? (Choose three)

stage

transaction

statement

error

memory

idle

16 How does a Performance Schema provide insight into database activity? (Choose three)

By analyzing errors that occur on the system

By analyzing I/O wait statistics

By analyzing historical performance data

By interpreting the Performance Schema to DBAs for diagnostic use cases

By analyzing the audit record of server activity in log files

By analyzing which queries are running

17 Which MySQL logs can be stored in tables? (Choose two)

Audit log

General query log

Slow query log

Binary log

Error log

18 You plan to use the test authentication plug-in test_plugin_server. Which statements are true? (Choose two)

It sends a plain text password to the server.

It authenticates against operating system users and groups.

It only allows MySQL users to log in via a UNIX socket.

It is intended for use during testing and development.

It implements native and old password authentication.

19 Which command activates roles at the session level?

SET PERSIST activate_all_roles_on_login = ON;

SET DEFAULT ROLE ALL TO kari@localhost;

ALTER USER kari@localhost DEFAULT ROLE ALL;

SET ROLE ALL;

20 Which command removes DDL privileges from a role?

REVOKE DELETE, INSERT, UPDATE ON world.* FROM r_dev;

REVOKE CREATE, DROP ON world.* FROM r_dev;

REVOKE GRANT OPTION ON world.* FROM r_dev

REVOKE r_updater FROM r_dev;

21 The -ssl-mode option in your configuration is VERIFY_CA. What does this do?(Choose two)

It establishes secure connections or fails if unable to do so. 建立安全连接或失败(无法建立则连接失败)

It checks whether host names match the Common Name value in the server certificate.

It verifies that server digital certificates match the MySQL server hosts.

It establishes secure connections if it can but if not then unsecure connections are eastablished.

It verifies server digital certificates with the Certificate Authority. 验证服务器证书是否由可信的 CA 签发

22 After firewall training is complete, which modes will make the statement digest persistent in the account's whitelist cache? (Choose two)

RECORDING

RESET

PROTECTING

DETECTING

OFF

23 Which statements are true about Brute Force attacks? (Choose two)

They compare password hashes against the stored hashes in the MySQL database.

They match target password hashes against rainbow tables.

They are slow as they require lots of CPU.

They perform hashing operations on the characters to find matching hashes.

They perform hashing operations on combinations of dictionary words and characters.

24 Examine this command and output: SHOW STATUS LIKE 'Connection_control%'; | Variable_name | Value | | Connection_control_delay_generated | 7 | 1 row in set (#.## sec) Which is true?

A seven millisecond delay is added for each consecutive connection failure.

The maximum possilbe added delay is seven milliseconds.

MySQL server added a delay for failed connection attempts seven times.

Seven successive failures are permitted before adding a delay.

25 Which command registers the appuser@apphost account for firewall training?

CALL mysql.sp_set_firewall_mode('appuser@apphost', 'PROTECTING')

CALL mysql.sp_set_firewall_mode('appuser@apphost', 'OFF')

CALL mysql.sp_set_firewall_mode('appuser@apphost', 'RECORDING')

CALL mysql.sp_set_firewall_mode('appuser@apphost', 'RESET')

26 You observe poor system performance. Which commands will display currently executing queries? (Choose two)

SELECT * FROM sys.session\G

SHOW MASTER STATUS\G

SHOW GLOBAL STATUS\G

SHOW PROCESSLIST\G

SELECT * FROM performance_schema.session_status;

27 Examine this statement which executes successfully: "#mysqladmin --uroot --p kill 14" What does 14 represent in the output?

blocking_pid

waiting_pid

waiting_trx_id

blocking_trx_id

28 Which are server-level data locks? (Choose two)

Metadata locks

Row-level locks

Table locks

Locks that apply to internal resources

Storage engine data locks

29 Which are true about MySQL behaviour when attempting to access a table for which an Exclusive (X) table-level lock is held? (Choose two)

it allows other transactions to acquire shared locks on the table's rows

it prevents other transaction from locking any rows in the table.

It locks the table to allow shared row-level locking

it allows other sessions only to read rows.

it permits the transaction owning the lock to read and write rows

30 Which conditions force an update to the performance baseline? (Choose two)

changes in the exploratory configuration

increasing data volumes

server migration to a new subnet

changes in application usage patterns

changes in server connection credentials

31 Which actions are included in scaling out a database server? (Choose two)

writing software (application or storage engine) to use multiple locations

adding more servers to the environment

adding more CPU, storage, or main memory resources

increasing the network bandwidth

increasing the processing capacity of any single node

32 Which properties are true about Invisible Indexes? (Choose three)

They can be used to facilitate a staged rollout of changes caused by index removal.

They are updated when indexed columns in their associated table is modified by DML statements.

They can be applied to primary keys.

They provide an approximation of data distribution in indexed columns.

They can test the effect of removing an index on performance without dropping the index.

They analyze and store key distribution statistics of a table.

33 Which storage engines support the mysqlcheck client program? (Choose three)

MyISAM

BLACKHOLE

MEMORY

MERGE

InnoDB

ARCHIVE

34 What does the EXPLAIN command do? (Choose two)

It generates a query execution plan.

It performs data modification in a query.

It examines SQL statements beginning with the SELECT, INSERT, REPLACE, UPDATE, and DELETE statements.

It enables efficient access to rows.

It returns data from tables.

35 Which materially improves overall system performance? (Choose two)

A query that executes once per minute has its response time reduced from 2 seconds to 1 second.

A query that executes once per minute has its response time reduced from 2 seconds to 800 ms.

A query that executes once per minute has its response time reduced from 20 ms to 15 ms.

A query that executes several thousand times per minute has its response time reduced from 40 ms to 25 ms.

A query that executes several thousand times per minute has its response time reduced from 50 ms to 40 ms.

36 Examine this command which executes successfully: mysql> EXPLAIN SELECT emp_no, title FROM titles \G It generates this output: id: 1 select_type: SIMPLE table: titles partitions: NULL type: eq_ref ... Which type of comparison plan is used to access rows?

matching rows in a range that the named index supports

matching one or more referenced values for equality

matching a primary or unique key against a constant at the start of a query

matching a single referenced value for equality

37 What does the FORCE command do? (Choose three)

forces an index rebuild even though the SQL statement does not change the table structure

produces multiple output rows when analyzing complex queries

provides the optimizer with extra information about data distribution

reorganizes data evenly across data pages

reclaims file system space used by empty pages

analyzes and stores key distribution statistics of a table

38 Which logs contain queries that the MySQL server executes? (Choose two)

the Binary log

the Relay log

the General query log

the Slow query log

the Audit log

39 Which techniques segregate data file backups from MySQL server data files? (Choose three)

MySQL enterprise backup

snapshots

OS copy commands

binary logging

distributed replicated block device

replication

40 Which methods are used for logical backups? (Choose three)

MySQL enterprise backup

SQL statements

snapshots

the mysqldump utility

OS copy commands

the mysqlpump utility

41 Which are advantages of the RAID mirroring process? (Choose two)

It enables the creation of live backups

It recovers data in the event of a hardware failure

It backs up both local and remote MySQL servers

It can reload a database on another server, running a different architecture

It creates a SQL script that can be executed on a MySQL server

42 Which are true about warm backups? (Choose two)

They lock data using multiversion concurrency control (MVCC).

Updates are not possible during these backups.

When backups occurs, the server is in an inaccessible mode.

They permit applications to only read data.

They do not impact system performance.

43 Which of these use full and binary log backups? (Choose two)

multiple backups of data modifications taken each hour to minimize exposure during each day

backups using mysqlbackup from a replication slave

daily/hourly supplemental backups containing live data

backups using mysqldump with the --where option

weekly conditional backups of large transactional tables containing only fixed or historical data

44 Which are features or capabilities of multisource replication? (Choose three)

consolidating data from multiple servers to a single server

adding processing load on the master

preventing slaves from making backups

merging table shards

backing up multiple servers to a single server

backing up files not requiring additional storage or processing on the master

45 Which command forces the current binary log to close and the next incremental binary log to open?

mysql> PURGE BINARY LOGS TO 'binlog.000048';

mysql> BINLOG 'next';

mysql> FLUSH BINARY LOGS;

mysql> GRANT RELOAD ON *.* TO 'backupuser'@'localhost';

46 Which are features of the mysqlpump utility? (Choose three)

taking physical backups of databases

restoring databases using dumped data files

faster reloading of secondary indexes for InnoDB tables

dumping InnoDB CREATE TABLESPACE statements

parallel processing of the database dump process

dumping user accounts as CREATE USER/GRANT statements

47 How does the - - master-data option of the mysqldump command ensure data consistency during a database backup? (Choose two)

It locks tables during backup.

It creates database and table structures but does not dump the data.

It acquires a global lock at the beginning of the backup operation.

It records the binlog position in the backup file.

It starts a new binary log.

48 Which are requirements for enabling multisource replication? (Choose two)

The slave must use TABLE-based repositories.

All masters and slaves must be configured to prevent data conflicts.

The slave must use FILE-based repositories.

The slave must create a replication channel for each master.

All masters and slaves must be in a star topology.

49 Which statement uses the global transaction identifier (GTID) replication protocol?

CHANGE MASTER TO RELAY_LOG_FILE='slave-relay-bin.006', RELAY_LOG_POS=4025;

CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=3312, MASTER_LOG_FILE='server2-bin.000001', MASTER_LOG_POS=723074;

CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=3311, MASTER_LOG_FILE='server1-bin.000001', MASTER_LOG_POS=155;

CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=3313, MASTER_AUTO_POSITION=1;

50 Which are advantages of MySQL replication? (Choose two)

Applications can scale-out SQL queries to multiple servers to reduce the response time.

Another server, either master or slave, can take over the duties of a crashed server to prevent application outages.

Clients can run queries on different servers simultaneously to prevent data conflicts.

When the master is down, a slave server can be configured to automatically become the master to prevent database inconsistencies.

Same-level slave servers can share updates in case of the master's failure to enable data coherency.

51 Which are true for semisynchronous replication? (Choose two)

After committing a transaction, the master blocks until at least one slave acknowledges the transaction.

If the master is configured as semisynchronous, then all slaves must be configured as semisynchronous.

It restricts masters and slaves to use only statement-based binary logging.

It improves query execution performance of the master and at least one slave.

It ensures data integrity between the master and at least one slave.

52 You used the SHOW SLAVE STATUS command on a slave and received this output: ... Master_Log_File: server1-bin.000004 Read_Master_Log_Pos: 275 Relay_Log_File: server2-relay-bin.000011 Relay_Log_Pos: 453 Relay_Master_Log_File: server1-bin.000002 Exec_Master_Log_Pos: 1307 ... What does this status signify? (Choose two)

Log events are being copied faster than they are being executed on the slave.

There is network latency when transferring events between master and slave.

The slave is still executing previous binary log events but has received another binary log from the master.

The binary log was re-sent as the slave failed to acknowledge completion

There is latency in the SQL thread rather than the I/O thread.

53 Which replication table in a performance schema contains the status of the SQL thread in a multithreaded slave?

replication_applier_status_by_worker

replication_applier_status

replication_applier_status_by_coordinator

replication_applier_configuration

54 Querying the I/O thread status of a replication slave displays this status message: Waiting for the slave SQL thread to free enough relay log space What does this status signify?

The I/O thread is executing a LOAD DATA statement and appending the data to a temporary file which will be processed by the slave.

The value of the relay_log_space_limit parameter is zero.

The combined size of the relay logs exceeds the value of relay_log_space_limit.

The I/O thread is copying an event to the relay log for processing by the SQL thread.

55 Which are required when troubleshooting a MySQL replication error? (Choose two)

Reviewing the events in the master binary log file.

Verifing that both master and slave have unique nonzero server ID values. 检查主从 server id

Verifying that the slave I/O thread serializes all event updates in the relay log.

Verifying that the Seconds_Behind_Master column displayed by the SHOW SLAVE STATUS command is zero.

Reviewing the Last_IO_Error and Last_SQL_Error columns displayed by the SHOW SLAVE STATUS command.

56 Which are functions of a slave SQL thread? (Choose two)

connecting with the master's binlog dump thread

allowing transactions updating different databases to run in parallel on a slave

copying events from the master relay log to the slave's relay log

distributing relay log events between worker threads on a multithreaded slave

reading events from the binary log and sending them to the slave I/O thread

57 Examine this parameter setting: SLAVE_PARALLEL_TYPE = DATABASE Which are true? (Choose two)

SLAVE_PARALLEL_WORKERS must be greater than zero for this setting to take effect

transactions that update different databases can run in parallel on a slave

master-slave data consistency is ensured when there are cross-database constraints

transactions that are part of the same binary log group commit on a master can to run in parallel on a slave

MASTER_AUTO_POSITION must be set to 1 for this setting to take effect

58 How does MySQL Shell (mysqlsh) support the administration of a cluster? (Choose two)

It manages failover by automatically routing server connections.

It enables access to MySQL features via APIs.

It implements a pluggable architecture and allows developers to create customized plug-ins.

It provides scripting capabilities using JavaScript, Python, and SQL commands.

It enables replicated server updates using binary log position and global transaction identifiers (GTIDs).

59 myCluster is an InnoDB cluster. Examine this mysqlsh statement and output: mysql-js > cluster.status() { "clusterName": "myCluster", "defaultReplicaSet": { "name": "default", "primary": "server2:3312", "status": "OK_NO_TOLERANCE", ... What does this status signify? (Choose two)

There is sufficient redundancy available to tolerate at least one failure.

There is no redundancy in the cluster, and the failure of a member will result in database outage.

One or more members may be online but their status is not ONLINE or RECOVERING.

One or more members are online but cannot form a quorum.

There are enough members online to form a quorum.

60 Which are true about a MySQL InnoDB cluster? (Choose two)

It uses MySQL Group Replication to replicate data between all servers in a group.

It relies on MySQL Router to interconnect replicated servers in a group.

It provides a confgurable capability for the administration of a group of server instances in a cluster.

It provides real-time access with data consistency across partitioned and distributed datasets.

It uses AdminAPI to work with relational and document data in the MySQL Document Store.

61 You have a live cluster with three servers. Executing the dba.getCluster() function returns the Cluster value "cluster". Which methods must be used, all of which are required, to add a fourth server to the cluster? (Choose three)

dba.configureInstance()

cluster.dissolve()

cluster.addInstance()

cluster.rescan()

dba.configureLocalInstance()

cluster.rejoinInstance()

62 Examine this mysqlsh statement and output: mysql-js> cluster.checkInstanceState("root@server4:3314") ... ... { "reason": "recoverable", "state": "ok" } What does the output signify?

The instance has more executed GTIDs than the executed GTIDs of the cluster seed instances.

The instance has executed GTIDs, which do not conflict with the executed GTIDs of the cluster seed instances.

The instance has executed GTIDs, which diverge with the executed GTIDs of the cluster seed instances.

The instance has not executed any GTID transactions; therefore, it cannot conflict with the GTIDs executed by the cluster.

63 Which are functions of Group Replication? (Choose two)

assigning replication servers to groups of three to nine servers

in single-primary mode, enabling all servers to accept transactions but only the primary decides the order to commit

in multi-primary mode, enabling group members to certify the order of transactions within the global sequence of transactions

enabling automatic avoidance of "split-brain" situations among group members

in multi-primary mode, enabling automatic election of a new primary when the primary server fails

相关推荐
呼啦啦呼啦啦啦啦啦啦1 小时前
利用pdfjs实现的pdf预览简单demo(包含翻页功能)
android·javascript·pdf
游戏开发爱好者85 小时前
iOS App 电池消耗管理与优化 提升用户体验的完整指南
android·ios·小程序·https·uni-app·iphone·webview
人生游戏牛马NPC1号6 小时前
学习 Flutter (四):玩安卓项目实战 - 中
android·学习·flutter
星辰也为你祝福h7 小时前
Android原生Dialog
android
梁同学与Android8 小时前
Android ---【CPU优化】需要优化的原因及优化的地方
android
Misha韩8 小时前
React Native 基础tabBar和自定义tabBar - bottom-tabs
android·react native
iHero9 小时前
【Nextcloud】在 Ubuntu 22.04.3 LTS 上的 Nextcloud Hub 10 (31.0.2) 后台任务cron 的优化
android·linux·ubuntu·nextcloud
yuanlaile12 小时前
Flutter Android打包学习指南
android·flutter·flutter打包·flutter android
教程分享大师13 小时前
中兴B860AV5.1-M2_S905L3SB最新完美版线刷包 解决指示灯异常问题
android