标题: MySQL 8.0 OCP 1Z0-908 121-130题 [打印本页] 作者: 何小豆儿在此 时间: 16 小时前 标题: MySQL 8.0 OCP 1Z0-908 121-130题 Q121.Examine these statements and output:
mysql> GRANT PROXY ON accounting@localhost TO ’ ‘@ ‘%’;
mysql> SELECT USER(), CURRENT_USER(), @@proxy_user;
±-----------------------±------------------±----------------+
|USER() | CURRENT_USER() | @@proxy_user I
| jrsmith@localhost |accounting@localhost | ’ ‘@’%’ |
±-----------------------±------------------±----------------+
Which statement is true?
A)The user failed to define a username and the connecting username defaulted to ‘’@‘%’.
B)The user is authorized as the jrsmith@localhost user.
C)The user is authenticated as the anonymous proxy user ’ '@ ‘%’.
D)The user is logged in with --user=accounting as an option.
E)The user is authorized as the accounting@localhost user.
Answer:E
Q122.Which two actions can obtain information about deadlocks?
A)Run the SHOW ENGINE INNODB MUTEX command from the mysql client.
B)Enable the innodb_status_output_locks global parameter.
C)Enable the innodb_print_all_deadlocks global parameter.
D)Run the SHOW ENGINE INNODB STATUS command from the mysql client.
E)Use the sys.innodb_lock_waits view.
Answer:CD
Q123.Examine this statement, which executes successfully:
CREATE TABLE world.city(
ID int NOT NULL AUTO_INCREMENT ,
Name char(35) NOT NULL DEFAULT ‘’ ,
CountryCode char(35) NOT NULL DEFAULT ’ ',
District char (20) NOT NULL DEFAULT ‘’,
Population int NOT NULL DEFAULT ‘0’,
PRIMARY KEY (ID) ,
KEY CountryCode (CountryCode)
)ENGINE=InnoDB;
You want to improve the performance of this query:
SELECT Name
FROM world. city
WHERE Population BETWEEN 1000000 AND 2000000;
Which change enables the query to succeed while accessing fewer rows?
A)ALTER TABLE world.city ADD INDEX (Name) ;
B)ALTER TABLE world.city ADD SPATIAL INDEX (Name) ;
C)ALTER TABLE world.city ADD FULLTEXT INDEX (Name) ;
D)ALTER TABLE world.city ADD FULITEXT INDEX (Population);
E)ALTER TABLE world.city ADD SPATIAL INDEX (Population) ;
F)ALTER TABLE world.city ADD INDEX (Population) ;
Answer:F
Q124.User ‘fwuser’@‘1ocalhost’ is registered with the MySQL Enterprise Firewall and has been granted
privileges for the SAKILA database.
Examine these commands that you executed and the results:
mysql> SELECT MODE FROM INFORMATION SCHENA.MYSOL_FIREKALL _USERS
WHERE USERHOST.fwuser@localhost’;
mysql> SELECT RULE FROM INFORMATION SCHENA.MYSQL_FIREWALL_WHITELIST WHERE USRHOST * ‘fwuser@localhost’;
±----------------------------------------------------------------------------------+
|RULE |
±----------------------------------------------------------------------------------+
|SELECT ‘first_Name’ n,‘last._name’ FROM .’ customer’ WHERE ‘customer_id’ ? |
|SELECT 'get. customer_balance’ (? . NOW ( ) ) |
|UPDATE ‘rental’ SET ‘return date’. = NOwl ( ) WHERE ‘rental_id’ = ? |
|SELECT @@‘version comment’ LIMIT ? |
±----------------------------------------------------------------------------------+
You then execute this command:
mysql> CALL mysql.sp_set_firewall_mode(‘fwuser@localhost’,‘RESET’);
Which two are true?
A)The fwuser@localhost account is removed from the mysql.user table.
B)The information_schema.MYSQL_FIREWALL_WHITELIST table is truncated,
C)The whitelist of the fwuser@localhost account is truncated.
D)The mysql.Firewall_users table is truncated.
E)The firewall resets all options to default values.
F)The fwusere@localhost account mode is set to DETECTING.
G)The fwuserd@localhost account mode is set to OFF.
Answer:CG
Q125.A newly deployed replication master database has a 10/90 read to write ratio.
The complete dataset is currently 28G but will never fluctuate beyond ± 10%.
The database storage system consists of two locally attached PCI-E Enterprise grade disks (mounted as /data1 and /data2)
The server is dedicated to this MySQL Instance.
System memory capacity is 64G.
The my.cnf file contents are displayed here:
[mysqld]
datadir=/data1/
innodb_buffer_pool_size=28G
innodb_log_file_size=150M
Which four changes provide the most performance improvement, without sacrificing data integrity?
A)innodb-doublewrite=off
B)innodb_1og_group_home_dir=/data2/
C)innodb_1og_file_size=1G
D)innodb_undo_directory=/dev/shm
E)log-bin=/data2/
F)innodb_flush_log_at_trx_commit=0
G)sync_binlog=0
H)innodb_buffer_pool_size=32G
I)disable-log-bin
Answer:BCGH
Q126.You have a MySQL instance with GTIDs enabled. This instance runs more than 100 transactions per second.
You discover that some data was deleted at a particular point in time.
You decide to perform a recovery from the binary logs as they are all available.
Which two commands can restore the database to the point right before data was deleted?
A) mysqlbinlog --skip-gtids…
B) mysqlbinlog --stop-position…
C) START SLAVE SQL_THREAD UNTIL SQL_BEFORE_GTIDS=…
D) mysqlbinlog --stop-datetime…
E) START SLAVE IO_THREAD UNTIL SQL_BEFORE_GTIDS=… …
Answer:AC
Q127.You need to find the number of examined rows for queries that have completed.
All relevant configurations are enabled for recording the information.
Which three sources contain the number of examined rows?
A. the Performance Schema
B. the Information Schema
C. the error log
D. the general query log
E. the sys schema
F. the slow query log
Answer:AEF
Q128.Identify two ways to significantly improve data security.
A)Configure mysqld to run as the system admin account, such as root.
B)Use a private network behind a firewall.
C)Configure mysqld to use only networked disks.
D)Configure MySQL to have only one administrative account.
E)Configure mysqld to use only local disks or attached disks and to have its own account in the host system.
Answer:BD
选项A:使用root安全性更低
选项B:使用防火墙后的私有网络,这个会提高数据安全性
选项C:将mysqld配置在网络磁盘上,这个风险性更大了
选项D:只配置一个管理员账户,这个正确
选项E:
复制代码
Q129.Which characters are most commonly used in a SQL injection attack?
A)
B) null (\0) and newline (\n)
C) ^ and $
D) + and -
E) 'and"
Answer:E
SQL注入不懂
复制代码
Q130.Examine these commands, which execute successfully on the ic1 host:
mysqlsh> dba. createCluster(‘cluster1’, {}memberWeight:35})
mysqlsh> var mycluster = dba.getCluster ()
mysqlsh> mycluster.addInstance(’ ic@ic2’, {memberWeight:25})
mysqlsh> mycluster.addInstance(’ ic@ic3’, {memberWeight:50})
Now examine this configuration setting, which is the same on all nodes:
group_replication_consistency=BEFORE_ON_PRIMARY_FAILOVER
Which statement is true if primary node ic1 fails?
A)Node ic2 becomes the new primary and existing transactions are considered stale and rolled back.
B)Node ic3 becomes the new primary and existing transactions are considered stale and rolled back.
C)Node ic3 becomes the new primary and is ignored until any backlog of transactions is completed//节点 ic3 成为新的主节点,并在完成所有积压的事务之前被忽略
D)Only two nodes remain so the election process is uncertain and must be done manually.
E)Node ic2 becomes the new primary and is ignored until any backlog of transactions is completed.
Answer:C
group_replication_consistency