M y S Q L5.7O C P考试习题大全
Question: 1
A MySQL database uses all InnoD
B tables and is configured as follows:
shell>cat/ etc/ myf
[mysqld]
log-bin
server-id=1
You will be setting up a replication slave by using mysqldump. You will need a consistent backup taken from your running production server. The process should have minimal impact to active database connections.
Which two arguments will you pass to mysqldump to achieve this?
A.--skip-opt
B.--lock-all-tables
C.--create-apply-log
D.--single-transaction
E.--master-data
Answer: DE
Question: 2
Consider the key buffer in a MySQL server. Which two statements are true about this feature?
A.It caches index blocks for MyISAM tables only.
B.It caches index blocks for all storage engine tables.
C.It is a global buffer.
D.It is set on a per-connection basis.
E.It caches index blocks for InnoDB tables only.
Answer: A,C
Question: 3
You have a MySQL replication setup and you intentionally stop the SQL thread on the slave. mysql> SHOW SLAVE STATUS\ G
...
Slave_IO_Running: Yes
Slave_SQL_Running: No
What are two reasons that you may stop the SQL thread on the slave while keeping the I/ O thread running?
< allow the remaining events to be processed on the slave while not receiving new events from the
master
< allow a backup to be created under reduced load
< allow for point-in-time recovery on the slave
< prevent schema changes from propagating to the slave before they are validated
< prevent any transaction experiencing a deadlock
Answer: C,D
Question: 4
Which three statements correctly describe MySQL InnoDB Cluster?
A.The cluster can be operated in multimaster mode with conflict detection for DML statements.
B.All MySQL client programs and connectors can be used for executing queries.
C.It provides fully synchronous replication between the n odes.
mysql存储过程题目D.There is support for automatic failover when one node fails.
E.The data is automatically shared between the nodes.
F.Each query will be executed in parallel across the nodes.
Answer: ABD
Question: 1
A MySQL database uses all InnoD
B tables and is configured as follows:
shell>cat/ etc/ myf
[mysqld]
log-bin
server-id=1
You will be setting up a replication slave by using mysqldump. You will need a consistent backup taken from your running production server. The process should have minimal impact to active database connections.
Which two arguments will you pass to mysqldump to achieve this?
A.--skip-opt
B.--lock-all-tables
C.--create-apply-log
D.--single-transaction
E.--master-data
答案: DE
Question: 2
Consider the key buffer in a MySQL server. Which two statements are true about this feature?
A.It caches index blocks for MyISAM tables only.
B.It caches index blocks for all storage engine tables.
C.It is a global buffer.
D.It is set on a per-connection basis.
E.It caches index blocks for InnoDB tables only.
答案: A,C
Question: 3
You have a MySQL replication setup and you intentionally stop the SQL thread on the slave.
mysql> SHOW SLAVE STATUS\ G
...
Slave_IO_Running: Yes
Slave_SQL_Running: No
What are two reasons that you may stop the SQL thread on the slave while keeping the I/ O
thread running?
< allow the remaining events to be processed on the slave while not receiving new events from the master
< allow a backup to be created under reduced load
< allow for point-in-time recovery on the slave
< prevent schema changes from propagating to the slave before they are validated
< prevent any transaction experiencing a deadlock
答案: C,D
Question: 4
Which three statements correctly describe MySQL InnoDB Cluster?
A.The cluster can be operated in multimaster mode with conflict detection for DML statements.
B.All MySQL client programs and connectors can be used for executing queries.
C.It provides fully synchronous replication between the nodes.
D.There is support for automatic failover when one node fails.
E.The data is automatically shared between the nodes.
F.Each query will be executed in parallel across the nodes.
第 2页共 3页
答案: ABD
Question: 5(死锁)
How does the InnoDB storage engine handle deadlocks when they are detected?
A.Both the affected transactions will be rolled back.
B.The affected transactions wait for innodb_lock_wait_timeout seconds, and then roll back.
C.One of the affected transactions will be rolled back, the other is allowed to proceed.
D.The transaction isolation level determines which transaction is rolled back.
E.The innodb_locks_unsafe_for_binlog setting determines which transaction is rolled back. 答案: C
Question: 6
sql/doc/refman/5.6/en/memory-use.html Which three allocate memory per thread in MySQL?
A.query cache
B.thread cache
D.internal temporary table
E.sort buffer
F.InnoDB buffer pool instance
答案: C,D,E
Question: 7
You are setting up a new installation of MySQL Server 5.7 (a GA release.) You have used a ZIP or TAR package to ensure that the mysqld binary, along with its support files, such as plug-ins and error messages, now exist on the host.
Assume that the default datadir exists on the host. You installed the binary in the default location (the default --basedir value) for your operating system.
Which step should you perform before defining your own databases and database tables?
A.Execute a command with a minimal form of: mysqld --initialize
B.Register mysqld as a service that will start automatically on this host machine.
C.Create a configuration file containing default-storage-engine=InnoDB.
D.Set an exception in the host machine’s firewall to allow external users to talk tomysqld.
E.Create additional login accounts (so that everyone does not need to log in as root) and assign them appropriate privileges.
答案: A
Question: 8
Which two options describe how MySQL Server allocates memory?
A.Each connection may have its own per-thread memory allocations.
B.Thread memory is pre-allocated up to thread_cache_size for performance.
C.Each thread allocates memory from a global pool.
D.Global memory resources are allocated at server startup.
答案: A,D
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论