1.A simple master-to-slave replication is currently being used.The following information is extracted from the SHOW SLAVE STATUS output:
Last_SQL_Error:Error'Duplicate entry'8'for key'PRIMARY''on query.
Default database:'mydb'.Query:'insert into mytable VALUES('8','George')'Skip_Counter:0Retrieved_Gtid_Set:
38f32e23480a7-32a1-c323f78067fd37821:1-8Auto_Position:1
You execute a"SHOW CREATE TABLE mytable"on the slave:
CREATE TABLE'mytable'('ID'int(11)NOT NULL
DEFAULT'0','name'char(10)DEFAULT NULL,PRIMARY KEY('ID'))
The table mytable on the slave contains the following:
You have issued a STOP SLAVE command.One or more statements are required before you can issue a START SLAVE command to resolve the duplicate key error.Which statement should be used?
A.SET GTID_NEXT="CONSISTENCY";BEGIN;COMMIT;SET GTID_NEXT="AUTOMATIC";
B.SET GLOBAL enforce_gtid_consistency=ON
C.SET GTID_EXECUTED="38f32e23480a7-32a1-c323f78067fd37821:9";
D.SET GTID_NEXT="38f32e23480a7-32a1-c323f78067fd37821:9";BEGIN;COMMIT;SET GTID_NEXT="AUTOMATIC";
E.SET GLOBAL SQL_SKIP_SLAVE_COUNTER=1
Answer:E
2.Consider the following statement on a RANGE partitioned table:
ALTER TABLE orders DROP PARTITION p1,p3;
mysql下载出现installer
What is the outcome of executing the above statement?
A.A syntax error will result as you cannot specify more than one partition in the same statement.
B.All data in p1and p3partitions are removed and the table definition is changed.
C.All data in p1and p3partitions are removed,but the table definition remains unchanged.
D.Only the first partition(p1)will be dropped as only one can be dropped at any time.
Answer:B
3.You inherit a legacy database system when the previous DBA,Bob,leaves the company.
You are notified that users are getting the following error:
mysql>CALL film_in_stock(40,2,@count);
ERROR1449(HY000):The user specified as a definer('bon'@'localhost')does not exist
How would you identify all stored procedures that pose the same problem?
A.Execute SHOW ROUTINES WHERE DEFINER='bob@localhost'.
B.Execute SELECT*FROM INFORMATION_SCHEMA.ROUTINES WHERE DEFINER='bob@localhost';.
C.Execute SELECT*FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER='bob'and HOST='localhost';.
D.Examine the Mysql error log for other ERROR1449messages.
E.Execute SELECT*utines WHERE DEFINER='bob@localhost';.
Answer:B
4.When designing an InnoDB table,identify an advantage of using the BIT datatype Instead of one of the integer datatypes.
A.BIT columns are written by InnoDB at the head of the row,meaning they are always the first to be retrieved.
B.The BIT columns can be manipulated with the bitwise operators&,|,~,^,<<,and>>.The other integer types cannot.
C.Multiple BIT columns pack tightly into a row,using less space.
D.BIT(8)takes less space than eight TINYINT fields
Answer:D
5.ROW-based replication has stopped working.You investigate the error log file and find the following entries:
2013-08-2714:15:479056[ERROR]Slave SQL:Could not execute Delete_rows event on table test.t1;
Can't find record in't1',Error_code:1032;handler error HA_ERR_KEY_NOT_FOUND;the event's master log56_master-bin. 000003,end_log_pos851,Error_code:1032
2013-08-2714:15:479056[warning]Slave:Can't find record in't1'Error_code:1032
2013-08-2714:15:479056[ERROR]Error running query,slave SQL thread aborted.Fix the problem,and restart the slave SQL thread with"SLAVE START".
We stopped at log'56_masterbin.000003'position684Why did you receive this error?
A.The slave SQL thread does not have DELETE privileges to execute on test.t1table.s
B.The table definition on the slave-litters from the master.
C.Multi-threaded replication slaves can have temporary errors occurring for cross database updates.
D.The slave SQL thread attempted to remove a row from the test.t1table,but the row did not exist.
Answer:D
6.Mysqldump was used to create a single schema backup;
Shell>mysqldump–u root–p sakila>sakila2013.sql
Which two commands will restore the sakila database without interfering with other running database?
A.Mysql>USE sakila;LOAD DATA INFILE'sakila2013.sql';
B.Shell>mysql–u root–p sakila sakila2013.sql
C.Shell>mysql import–u root–p sakila sakila2013.sql
D.Shell>mysql–u root-p–e'use sakila;source sakila2013.sql'
E.Shell>mysql–u root–p–silent<sakila2013.sql
Answer:BD
7.Consider the Mysql Enterprise Audit plugin.You are checking user accounts and attempt the following query:
Mysql>SELECT user,host,plugin FROM mysql.users;
ERROR1146(42S02):Table'mysql.users'doesn't exist
Which subset of event attributes would indicate this error in the audit.log file?
A.NAME="Query"STATUS="1146"SQLTEXT="Error1146(42S02):Table'mysql.users'doesn't exist"/>
B.NAME="Query"STATUS="1146"SQLTEXT="select user,host from users"/>
C.NAME="Error"STATUS="0"SQLTEXT="Error1146(42S02):Table'mysql.users'doesn't exist"/>
D.NAME="Error"STATUS="1146"SQLTEXT="Error1146(42S02):Table'mysql.users'doesn't exist"/>
E.NAME="Query"STATUS="1146"SQLTEXT="Error1146(42S02):Table'mysql.users'doesn't exist"/>
Answer:B
8.Which query would you use to find connections that are in the same state for longer than180seconds?
A.SHOW FULL PROCESSLIST WHEER Time>180;
B.SELECT*FROM INFORMATION_SCHEMA.EVENTS SHERE STARTS<(DATE_SUB(NOW(),INTERVAL180SECOND));
C.SELECT*FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE STATE<(DATE_SUB(NOW(),INTERVAL180 SECOND));
D.SELECT*FROM INFORMATION_SCHEMA.PROCESSLIST WHERE TIME>180;
Answer:D
9.A database exists as a read-intensive server that is operating with query_cachek_type=DEMAND.
The database is refreshed periodically,but the resultset size of the queries does not fluctuate.
Note the following details about this environment:A web application uses a limited set of queries.The Query Cache hit rate is high.
All resultsets fit into the Query Cache.All queries are configured to use the Query Cache successfully.The response times for queries have recently started to increase.
The cause for this has correctly been identified as the increase in the number of concurrent users accessing the web service.
Based solely on the information provided,what is the most likely cause for this slowdown at the database level?
A.The Query Cache is pruning queries due to an increased number of requests.
B.Query_cache_min_res_unit has been exceeded,leading to an increased performance overhead due to additional memory block lookups.
C.Mutex contention on the Query Cache is forcing the queries to take longer due to its singlethreaded nature.
D.The average resultset of a query is increasing due to an increase in the number of users requiring SQL statement execution.
Answer:C
10.You have a login-path named"adamlocal"that was created by using the mysql_config_editor command.
You need to check what is defined for this login_path to ensure that it is correct for you deployment.
You execute this command:
$mysql_config_editor print–login-path=adamlocal
What is the expected output of this command?
A.The command prints all parameter for the login-path.The password is replaced with stars.
B.The command prints the encrypted entry for the login-path.The is only possible to see if an entry exists.
C.The command prints all parameters for the login-path.The password is shown only when you provide the–password option.
D.The command prints all parameters for the login-path.The password is printed in plain tex
Answer:A
11.You are using replication and the binary log files on your master server consume a lot of disk space.
Which two steps should you perform to safely remove some of the older binary log files?
A.Use the command PURGE BINARY LOGS and specify a binary log file name or a date and time to remove unused files.
B.Execute the PURGE BINARY LOGE NOT USED command.
C.Remove all of the binary log files that have a modification date earlier than today.
D.Edit the.index file to remove the files you want to delete.
E.Ensure that none of the attached slaves are using any of the binary logs you want to delete.
Answer:AE
12.Which two statements are true about InnoDB auto-increment locking?
A.The auto-increment lock can be a table-level lock.
B.InnoDB never uses table-level locks.
C.Some settings for innodb_autoinc_lock_mode can help reduce locking.
D.InnoDB always protects auto-increment updates with a table-level lock.
E.InnoDB always protects auto-increment updates with a table-level lock.
Answer:AC
13.Consider the Mysql Enterprise Audit plugin.A CSV file called data.csv has100rows of data.
The stored procedure prepare_db()has10auditable statements.
You run the following statements in the mydb database:
Mysql>CALL prepare_db();
Mysql>LOAD DATA INFILE'/tmp/data.cav'INTO TABLE mytable;
Mysql>SHOW TABLES;
How many events are added to the audit log as a result of the preceding statements?
A.12;only top-level statements and stored procedure events are logged.
B.111;top-level statements and all lower-level statements are logged.
C.3;only the top-level statements are logged.
D.102;top-level statements are logged,but LOAD DATA INFILE is logged as a separate event.
Answer:C
14.You execute the following statement in a Microsoft Windows environment.There are no conflicts in the path name definitions.
C:\>mysqld–install Mysql56–defaults–file=C:\my–optsf
What is the expected outcome?
A.Mysql is installed as the Windows service name Mysql56,and uses c:\my-optsf as the configuration file
B.An error message is issued because–install is not a valid option for mysqld.
C.A running Mysql5.6installation has its runtime configuration updated with the server variables set in c:\my-optsf.
D.Mysqld acts as an MSI installer and installs the Mysql5.6version,with the c:\my-optsf configuration file.
Answer:A
15.Consider the events_%tables in performance Schema.
Which two methods will clear or reset the collected events in the tables?
A.Using DELETE statements,for example,DELETE FROM performance_schema.events_watis_current;
B.Using the statement RESET PERFORMANCE CACHE;
C.Using the statement FLUSH PERFORMANCE CACHE;
D.Using TRUNCATE statements,for example,TRUNATE TABLE performance_schema.events_waits_current;
E.Disabling and re-enabling all instruments
F.Restarting Mysql
Answer:DF
16.What are four capabilities of the mysql client program?
A.Creating,dropping,and modifying tables and indexes
B.Initiating a binary backup of the database by using the START BACKUP command
C.Displaying replication status information
D.Shutting down the server by using the SHUTDOWN command
E.Creating and dropping databases
F.Creating and administering users
Answer:ACEF
17.Assume that you want to know which Mysql Server options were set to custom values.
Which two methods would you use to find out?
A.Check the configuration files in the order in which they are read by the Mysql Server and compare them with default values.
B.Check the command-line options provided for the Mysql Server and compare them with default values.
C.Check the output of SHOW GLOBAL VARIABLES and compare it with default values.
D.Query the INFORMATION_SCHEMA.GLOBAL_VARIABLES table and compare the result with default values.
Answer:CD
18.You install a copy of Mysql5.6.13on a brand new Linux server by using RPM packages.
The server starts successfully as verified by the following commands:$pidof mysqld3132
$tail–n2/
2013-08-1808:18:383132[Note]/usr/sbin/mysqld:ready for connections.
Version:'5.6.13-enterprise-commercial-advaced'
socket:'/tmp/mysql.sock'port;3306Mysql Enterprise Server–Advanced Edition(Commercial)You attempt to log in as the root user with the following command:$mysql–u root ERROR1045(28000):Access denied for user 'root'@'localhost'(using password:NO)
Which statement is true about this scenario?
A.The RPM installation script sets a default password of password for new installations.
B.The local root user must log in with a blank password initially:mysql–u root–p.
C.New security measures mean that the mysql_secure_installation script must be run first on all new installations.
D.The mysql_install_bd post-installation script used–random-password.
Answer:D
19.A Mysql Server has been running an existing application successfully for six months.
The myf is adjusted to contain the following additional configuration:[mysqld] Default-authentication-plugin=sha256_password The Mysql Server is restarted without error.
What effect will the new configuration have in existing accounts?
A.They all connect via the secure sha256_password algorithm without any configuration change.
B.They are not affected by this configuration change.
C.They will have to change their password the next time they login to the server.
D.They will have their passwords updated on start-up to sha256_password format.
Answer:B
20.In a design situation,there are multiple character sets that can properly encode your data.
Which three should influence your choice of character set?
A.Syntax when writing queries involving JOINS
B.Syntax when writing queries involving JOINS
C.Memory usage when working with the data
D.Character set mapping index hash size
E.Disk usage when storing data
Answer:CDE
21.What are three actions performed by the mysql_secure_installation tool?
A.It prompts you to set the root user account password.
B.It checks whether file permissions are appropriate within datadir.
C.It asks to remove the test database,which is generated at installation time.
D.It can delete any anonymous accounts.
E.It verifies that all users are configuration with the longer password hash.
Answer:ACD
22.Consider the query:
Mysql>SET@run=15;
Mysql>EXPLAIN SELECT objective,stage,COUNT(stage)
FROM iteminformation
WHERE run=@run AND objective=’7.1’
GROUP BY objective,stage
ORDER BY stage;
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论