option
Questions
ayuda
daypo
search.php

ERASED TEST, YOU MAY BE INTERESTED ON MySQL

COMMENTS STATISTICS RECORDS
TAKE THE TEST
Title of test:
MySQL

Description:
MySQL prep

Author:
outer
Other tests from this author

Creation Date: 25/10/2024

Category: Others

Number of questions: 95
Share the Test:
New CommentNuevo Comentario
No comments about this test.
Content:
Examine this statement, which executes successfully: CREATE TABLE world. city ( ID Int NOT NULL INCREMENT, Name char(3S) NOT NULL countrycode char(3) NOT NULL DEFAULT DI strict char (20) NOT NULL DEFAULT Populatlon int NOT NULL DEFAULT '0' PRIMARY KEY (ID KEY CountryCode (CountryCode ) 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? ALTER TABLE world.city ADD SPATIAL INDEX (Name); ALTER TABLE world.city ADD SPATIAL INDEX (Population); ALTER TABLE world.city ADD INDEX (Population); ALTER TABLE world.city ADD INDEX (Name); ALTER TABLE world.city ADD FULLTEXT INDEX (Name); ALTER TABLE world.city ADD FULLTEXT INDEX (Population);.
Which three are characteristics of a newly created role? (Choose three.) It can be dropped using the DROP ROLE statement. It is stored in the mysql.role table. It is created as a locked account. It can be renamed using the RENAME ROLE statement. It can be granted to user accounts. It can be protected with a password.
You have configured GTID-based asynchronous replication with one master and one slave. A user accidentally updated some data on the slave. To fix this, you stopped replication and successfully reverted the accidental changes. Examine the current GTID information: Master uuid: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaa Master gtids_executed: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaa:1-10300 Master gtids_purged: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaa:1-3820 Slave uuid: bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbb Slave gtids_executed: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaa:1-10167, bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbb:1-9 Slave gtids_purged: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaa:1-2312 You must fix GTID sets on the slave to avoid replicating unwanted transactions in case of failover. Which set of actions would allow the slave to continue replicating without erroneous transactions? RESET MASTER; SET GLOBAL gtid_purged=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-10167; SET GLOBAL gtid_purged=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-2312,bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb:1-9; SET GLOBAL gtid_executed=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-10167; RESET SLAVE; SET GLOBAL gtid_purged=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-3820; SET GLOBAL gtid_executed=aaaaaaaa-aaaa-aaaa-aaaa—aaaaaaaaaaaa:1-10300; RESET MASTER; SET GLOBAL gtid_purged-aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-2312; SET GLOBAL gtid_executed=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-10167; RESET SLAVE; SET GLOBAL gtid_purged=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-10167;.
The data in this instance is transient; no backup or replication will be required. It is currently under performing. The database size is static and including indexes is 19G. Total system memory is 32G. After profiling the system, you highlight these MySQL status and global variables: Com_rollback 85408355 Com_commit 1242342 Innodb_buffer_pool_pages_free 1242342 [mysqld] buffer_pool_slze=20G innodb_flush_log_at_trx_commit=2 disable-log-bin The OS metrics indicate that disk is a bottleneck. Other variables retain their default values. Which three changes will provide the most benefit to the instance? (Choose three.) innodb_flush_log_at_trx_commit=1 buffer_pool_size=24G innodb_log_file_size=1G sync_binlog=0 innodb_doublewrite=0 max_connections=10000 innodb_undo_directory=/dev/shm.
Which statement is true about InnoDB persistent index statistics? Updating index statistics is an I/O expensive operation. Index statistics are calculated from pages buffered in the buffer pool for tables with InnoDB storage engine. Setting innodb_stats_auto_recalc=ON causes statistics to be updated automatically when a new index is created. Execution plans based on transient index statistics improve precision when innodb_stats_persistent_sample_pages is increased. Increasing innodb_stats_persistent_sample_pages determines higher pages scanning speed, at the cost of increased memory usage. Tables are scanned and index statistics recalculated when an instance is restarted.
Which two are features of MySQL Enterprise Firewall? (Choose two.) recording incoming SQL statement to facilitate the creation of a whitelist of permitted commands blocking of potential threats by configuring pre-approved whitelists modifying SQL statement dynamically with substitutions automatic locking of user accounts who break your firewall provides stateless firewall access to TCP/3306.
Examine the modified output: mysql> SHOW SIAVE STATUS\G Slave 10 Running : Yes Slave SQL Running: Yes Seconds Behind Master: 1612 Seconds_Behind_Master value is steadily growing. What are two possible causes? (Choose two.) The master is most probably too busy to transmit data and the slave needs to wait for more data. One or more large tables do not have primary keys. This value shows only I/O latency and is not indicative of the size of the transaction queue. The master is producing a large volume of events in parallel but the slave is processing them serially. The parallel slave threads are experiencing lock contention.
You must configure the MySQL command-line client to provide the highest level of trust and security when connecting to a remote MySQL Server. Which value of --ssl-mode will do this? PREFERRED VERIFY_CA REQUIRED VERIFY_IDENTITY .
Consider this shell output and executed commands: [root@oel7 ~]# ps aux | grep mysqld mysql 2076 3.5 24.6 1386852 372572 ? Ssl 12:01 0:01 /usr/sbin/mysqid [root@oel7 ~]# kill -15 2076 Which statement is true about MySQL server shutdown? kill -15 should be avoided. Use other methods such as mysqladmin shutdown or systemctl stop mysqld. kill -15 and kill -9 are effectively the same forced shutdown that risk committed transactions not written to disk. kill -15 carries out a normal shutdown process, such as mysqladmin shutdown. Most Voted mysqld_safe prohibits commands that would harm the operation of the server. An error would be returned by the kill command.
You wish to protect your MySQL database against SQL injection attacks. Which method would fail to do this? installing and configuring the Connection Control plugin avoiding concatenation of SQL statements and user-supplied values in an application using stored procedures for any database access using PREPARED STATEMENTS.
You have just installed MySQL on Oracle Linux and adjusted your /etc/my.cnf parameters to suit your installation. Examine the output: # systemctl start mysqld Job for mysqld.service failed because the control process exited with error code. See "systencti status myscild.servicen and "journalctl -xe" for details. # systemctl status mysqld.service mysqld.service - MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Thu 2019-12-12 07:54:53 ACDT; 33s ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 2732 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS (code=exited, status=1/FAILURE) Process: 2705 ExecStartPre=/usr/bin/mysqldpre_systemd (code=exited, status=0/SUCCESS) Main PID: 2732 (code=exited, status=1/FAILURE) Status: "Server startup in progress" Dec 12 07:54:49 oel7 systemd[1]: Starting MySQL Server... Dec 12 07:54:53 oel7 systemd[1]: mysqld.service: main process exited, code=exited, status=1/FAILURE Dec 12 07:54:53 oel7 systemd[1]: Failed to start MySQL Server. Dec 12 07:54:53 oel7 systemd[1]: Unit mysqld.service entered failed state. Dec 12 07:54:53 oel7 systemd[1]: mysqld.service failed. What statement is true about the start attempt? MySQL server was not started due to a problem while executing process 2732. MySQL server continued to start up even though another process existed. systemd found the mysqld service disabled and failed to start it. systemd waited for 30 seconds before timing out and start up failed. systemd attempted to start mysqld, found another systemd mysqld process running, and shut it down.
Examine these entries from the general query log: root@localhost on mydb using SSL/TLS select @@version comment limit 1 root@localhost on mydb using SSL/TLS Query select START @@version_comment limit 1 START TRANSACTION UPDATE t1 SET val = 1 WHERE ID = 130 START TRANSACTION UPDATE t2 SET val = 5 WHERE ID = 3805 UPDATE t1 SET val = 10 WHERE ID = 130 UPDATE t2 SET val = 42 WHERE ID = 3805 All UPDATE statements reference existing rows. Which describes the outcome of the sequence of statements? Connection 24 experiences a lock wait timeout. Connection 25 experiences a lock wait timeout. A deadlock occurs immediately All statements execute without error. A deadlock occurs after innodb_lock_wait_timeout seconds.
Examine this command, which executes successfully: $ mysqlrouter --bootstrap user@hostname:port --directory=directory_path Which activity is performed? MySQL Router is configured based on the information in files in directory_path. MySQL Router configures itself based on the information retrieved from the InnoDB cluster metadata server. MySQL Router is restarted. MySQL Router configures all the cluster nodes based on the information retrieved from the InnoDB cluster metadata server.
You encountered an insufficient privilege error in the middle of a long transaction. The database administrator is informed and immediately grants the required privilege: GRANT UPDATE ON world.city TO ‘user1’; How can you proceed with your transaction with the least interruption? Roll back the transaction and start the transaction again in the same session. Re-execute the failed statement in your transaction. Change the default database and re-execute the failed statement in your transaction. Close the connection, reconnect, and start the transaction again.
Examine these statements, which execute successfully: CREATE ROLE r_world_rd; GRANT SELECT ON world.* TO r_world_rd; CREATE USER john IDENTIFIED BY ‘P@ssw0rd’; GRANT r_world_rd TO john; Examine these statements issued by user John: mysql» SHOW GRANTS; Grants for john GRANT USAGE ON * . * TO john GRANT 'r world rd' TO john 2 rows in set (0.01 sec) mysql» SELECT FROM world. city; ERROR 1142 (42000) : SELECT command denied to user What is the reason for the error? The statement was blocked by MySQL Firewall. John has not activated the role. John needs to reconnect to the database. The DBA needs to execute FLUSH PRIVILEGES.
Binary log events for the ‘mydb1’ schema must be copied to a different schema name ‘mydb2’. Which command will do this? mysqlbinlog --rewrite-db=’mydb1->mydb2’ | mysql mysqlbinlog --datebase=mydb1 --database=mydb2 | mysql mysqlbinlog --rewrite-db=’mydb1’ --rewrite-db=’mydb2’ | mysql mysqlbinlog --read-from-remote-server --raw | sed ‘s/mydb1/mydb2/g’ | mysql.
Examine this MySQL Shell command: dba.rebootClusterFromCompleteOutage() Which two statements are true? (Choose two.) It reconfigures InnoDB Cluster if the cluster was stopped. It performs InnoDB Cluster instances rolling restart. It only starts all InnoDB Cluster instances. It is not mandatory that all instances are running and reachable before running the command. It stops and restarts all InnoDB Cluster instances and initializes the metadata. It only stops and restarts all InnoDB Cluster instances. It picks the minimum number of instances necessary to rebuild the quorum and reconfigures InnoDB Cluster.
Which two statements are true about MySQL server multi-source replication? (Choose two.) It is not compatible with auto-positioning. It needs to be re-instanced after a crash to maintain consistency. It uses only time-based replication conflict resolution. It relies on relay_log_recovery for resilient operations. It does not attempt to detect or resolve replication conflicts. It must use GTID replication.
Which command enables rule-based MySQL Auditing capabilities? shell> mysql < audit_log_filter_linux_install.sql shell> mysqld --initialize --log-raw=audit.log mysql> INSTALL PLUGIN audit_log; mysql> INSTALL COMPONENT audit_log;.
Examine this SQL statement: mysql> GRANT r_read@localhost TO mark WITH ADMIN OPTION; Which two are true? (Choose two.) Mark can grant the privileges assigned to the r_read@localhost role to another user. ADMIN OPTION causes the role to be activated by default. Mark can grant the r_read@localhost role to another user. Mark can revoke the r_read@localhost role from another role. ADMIN OPTION allows Mark to drop the role. Mark must connect from localhost to activate the r_read@localhost role.
Which four are types of information stored in the MySQL data dictionary? (Choose four.) performance metrics table definitions access control lists view definitions server runtime configuration server configuration rollback stored procedure definitions InnoDB buffer pool LRU management data.
You have an InnoDB Cluster configured with three servers. Examine this command, which executes successfully: mysqldump -uroot -p -d mydatabase > mydatabase_backup.sql Due to data loss, the cluster is initialized and a restore is attempted resulting in this error: ERROR 13176 (HY000) at line 23: Cannot update GTID_PURGED with the Group Replication plugin running Which two actions, either one of which, can fix this error and allow a successful restore of the cluster? (Choose two.) Stop all instances except the primary read/write master instance and run the restore. Remove the @@GLOBAL.gtid_purged statement from the dump file. Create the backup by using the --set-gtid-purged=OFF option. Remove the group replication plugin from each instance before restoring. Remove the @@GLOBAL.gtid_executed statement from the dump file. Restore using the --set-gtid-purged=OFF option.
Which statement is true about MySQL Enterprise Transparent Data Encryption (TDE)? MySQL TDE uses an appropriate keyring plugin to store the keys in a centralized location. Both MyISAM and InnoDB tables can be encrypted by setting the keyring_engine = ALL variable in the MySQL configuration file. Lost tablespace encryption keys can be regenerated only if the master database key is known or present in the Key Vault specification. TDE can encrypt InnoDB and MyISAM tables only when the tables are stored in the SYSTEM tablespace.
You are upgrading a MySQL instance to the latest 8.0 version. Examine this output: mysq» SHOW GLOBAL VARIABLES LIKE '*dir' ; [removed] You plan to add this parameter to the configuration: innodb_directories=’/innodb_extras’ Which statement is true? It defines all innodb tablespace options relative to a starting parent directory. It is not necessary because innodb_data_home_dir is already defined. It allows scanning of other locations to discover more innodb tablespaces. It moves all innodb tablespaces to the /innodb_extras directory to enable a new innodb_data_home_dir to be defined. It adds more temporary workspace in addition to the innodb_tmpdir location.
You wish to store the username and password for a client connection to MySQL server in a file on a local file system. Which is the best way to encrypt the file? Use the AES_ENCRYPT() MySQL function on the option file. Use mysql_secure_installation to encrypt stored login credentials. Use a text editor to create a new defaults file and encrypt it from Linux prompt. Use mysql_config_editor to create an encrypted file.
You are backing up raw InnoDB files by using mysqlbackup. Which two groups of files will be backed up during a full backup? (Choose two.) ibbackup files *.CSM files *.sdi files *.ibd files ib_logfile* files.
You made some table definition changes to a schema in your MySQL Server. Which two statements reflect how MySQL Server handles the table definition changes? (Choose two.) MySQL writes SDI to the binary log for distributed backups. MySQL keeps InnoDB metadata changes in .sdi files in datadir. The metadata is serialized in JSON format in Serialized Dictionary Information (SDI). MySQL Server stores a copy of the serialized data in the InnoDB user tablespace. MySQL implicitly executes FLUSH TABLES and stores a snapshot backup of the metadata.
Which two are characteristics of snapshot-based backups? (Choose two.) Snapshot-based backups greatly reduce time during which the database and applications are unavailable. There is no need for InnoDB tables to perform its own recovery when restoring from the snapshot backup. The frozen file system can be cloned to another virtual machine immediately into active service. A separate physical copy must be made before releasing the snapshot backup. Snapshot backups can be used only in virtual machines.
You must run multiple instances of MySQL Server on a single host. Which three methods are supported? (Choose three.) Run MySQL Server docker containers. Use systemd with different settings for each instance. Use system tools to lock each instance to its own CPU. Start mysqld or mysqld_safe using different option files for each instance. Run mysqld with --datadir defined for each instance. Use resource groups to lock different instances on separate CPUs.
There are five MySQL instances configured with a working group replication. Examine the output of the group members: Member_state Unreachable Online Online Unreachable Unreachable Which two statements are true about network partitioning in the cluster? (Choose two.) The cluster will shut down to preserve data consistency. The cluster has built-in high availability and updates group_replication_ip_whitelist to remove the unreachable nodes. The group replication will buffer the transactions on the online nodes until the unreachable nodes return online. There could be both a 2 node and 3 node group replication still running, so shutting down group replication and diagnosing the issue is recommended. A manual intervention to force group members to be only the working two instances is required.
Examine this statement and output: mysql> SELECT ROW_NUMBERO OVER() AS QN, query, exec_count, avg_latency, lock_latency FROM sys.statement_analysis ORDER BY exec_count; +-----1 I QN I query +-----1 1 I SELECT SUM ( 'k' ) FROM 'mysch . () - INTERVAL ? SQL_TSI_HOUR 381268 31.44 ms 1.01m 2 I SELECT 'id' , 'val' , 'a' , 'b I . 'updated' WHERE 'created' < ? 150317 358.34us 30.06s 3 I SELECT 'emp_no' , 'val' , 'cre ated' + INTERVAL ? SQL_TSI_DAY 600 523.32ms 120.24ms 4 I SELECT 'a' , 'b' , 'c' FROM 'm . ? AND ? OR 'k' BETWEEN ? AND ? 200 10.32s 40.19ms 5 I SELECT 'a' , 'b' FROM 'myschem----I - ( 'emp_no' ) WHERE 'val' = ? I 1 21.03s 274.00us You must try to reduce query execution time. Which two queries should you focus on? (Choose two.) QN = 3 QN = 5 QN = 1 QN = 4 QN = 2.
mysql> SHOW FULL PROCESSLIS, 4 event_scheduler localhost 9 root localhost:51502 10 root localhost:51670 Examine this query: SELECT SUM(m.CURRENT_NUMBER_OF_SYTES_USED) AS TOTAL FROM performance_schema.memory_summary_by_thread_by_event_name m INNER JOIN performance_schema.threads t ON m.THREAD ID = t.THREAD ID WHERE t.PROCESSLIST ID = 10; What information does this query provide? total memory used across all connections associated with the user on connection number 10 total memory used by the first 10 connections total memory used by thread number 10 total memory used across all connections associated with the user on thread number 10 total memory used by connection number 10 total memory used by the first 10 threads.
On examination, your MySQL installation datadir has become recursively world read/write/executable. What are two major concerns of running an installation with incorrect file privileges? (Choose two.) Users could overwrite configuration files. Data files could be deleted. SQL injections could be used to insert bad data into the database. MySQL binaries could be damaged, deleted, or altered Extra startup time would be required for the MySQL server to reset the privileges.
An existing asynchronous replication setup is running MySQL 8. Which two steps are a part of implementing GTID replication? (Choose two.) Enable GTID by executing this on the master and the slave: SET GLOBAL GTID_ENABLED=on; Execute this on the slave to enable GTID: START SLAVE IO_THREAD WITH GTID; Restart MySQL (master and slave) with these options enabled: --gtid_mode=ON --log-bin --log-slave-updates --enforce-gtid-consistency Execute this on the slave to enable GTID: RESET SLAVE; START SLAVE GTID_NEXT=AUTOMATIC; On the slave, alter the MySQL master connection setting with: ALTER channel CHANGE MASTER TO MASTER_AUTO_POSITION = 1; On the slave, alter the MySQL master connection setting with: CHANGE MASTER TO MASTER_AUTO_POSITION = 1; .
Which four connection methods can MySQL clients specify with the --protocol option when connecting to a MySQL server? (Choose four.) TCP SOCKET PIPE DIRECT IPv6 FILE IPv4 MEMORY.
Examine this command and output: mysql> SELECT * FROM data_locks LIMIT 1\G *************************** 1. row **********xxxxxxxxxxxxxxxxx ENGINE: INNODB ENGINE_LOCK_ID: 1200:146 ENGINE TRANSACTION ID: 1200 THREAD:ID: 45 EVENT_ID: 11 OBJECT_SCHEMA: mydb OBJECT_NAME: mytablel PARTITION_NAME: NULL SUBPARTITION NAME: NULL INDEX NAME: NULL OBJECT INSTANCE_ iEGIN: 118793337250203 LOC_TYPE: RECORD LOCK_MODE: X LOCK_STATUS: GRANTED LOCK DATA: 1922,1922 Which two statements are true? (Choose two.) The lock is at the metadata object level. The lock is a shared lock. The lock is an intentional lock. The lock is at the table object level. The lock is a row-level lock. The lock is an exclusive lock.
Which three statements are true about MySQL replication? (Choose three.) Replication can use only TCP/IP connections. Any instance can have multiple slaves, but it can have only one master. Each instance in a replication topology must have a unique server ID. Binary logs contain only transactions originating from a single MySQL instance. Each slave must have its own MySQL user for replication. Binary logging must be enabled on the master in order to replicate to other instances. A replication user must have the SELECT privilege for all tables that need to be replicated.
Which two statements are true about the mysql_config_editor program? (Choose two.) It manages the configuration of the MySQL Firewall feature. It manages the configuration of client programs. It can move datadir to a new location. It manages the configuration of user privileges for accessing the server. It will use [client] options by default unless you provide --login-path. It can be used to create and edit SSL certificates and log locations. It provides an interface to change my.cnf files.
Examine this command, which executes successfully: shell> mysqldump --master-data=2 --single-transaction --result-file=dump.sql mydb Which two statements are true? (Choose two.) It executes flush tables with read lock. It enforces consistent backups for all storage engines. The backup created is a consistent data dump. This option uses the READ COMMITTED transaction isolation mode. It is a cold backup.
Examine this query and output: mysql> EXPLAIN ANALYZE SELECT city.CountryCode, country.Name AS Country_Name, city.Name, city.District, city. Population FROM world.city I NNER JOIN world.country ON country.Code = city.CountryCode WHERE country.Continent = 'Asia' AND city.Population > 1000000 ORDER BY city.Population DESC\G *************************** 1. row *************************** EXPLAIN: -> Sort: <temporary>.Population DESC (actual time=8.306..8.431 rows=125 loops=1) -> Stream results (actual time=0.145..8.033 rows=125 loops=1) -> Nested loop inner join (cost=241.12 rows=205) (actual time=0.141..7.787 rows=125 loops=1) -> Filter: (world.country.Continent = 'Asia') (cost=25.40 rows=34) (actual time=0.064..0.820 rows=51 loops=1) -> Table scan on country (cost=25.40 rows=239) (actual time=0.059..0.359 rows=239 loops=1) -> Filter: (world.city.Population > 1000000) (cost=4.53 rows=6) (actual time=0.030..0.131 rows=2 loops=51) -> Index lookup on city using CountryCode (CountryCode=world.country.'Code') (cost=4.53 rows=18) (actual time=0.023..0.096 rows=35 loops=51) 1 row in set (0.0094 sec) Which two statements are true? (Choose two.) The country table is accessed as the first table, and then joined to the city table. It takes more than 8 milliseconds to sort the rows. The optimizer estimates that 51 rows in the country table have Continent = ‘Asia’. 35 rows from the city table are included in the result. The query returns exactly 125 rows.
Which statement is true about user-defined records? They can be returned from a function. Field types must match column types. The number of fields must match the number of columns in a table. Field names must match selected column names.
Examine this MySQL client command to connect to a remote database: mysql -h remote.example.org -u root -p --protocol=TCP --ssl-mode= Which two --ssl-mode values will ensure that an X.509-compliant certificate will be used to establish the SSL/TLS connection to MySQL? REQUIRED VERIFY_CA VERIFY_IDENTITY PREFERRED DISABLED.
You want to log only the changes made to the database objects and data on the MySQL system. Which log will do this by default? general query log audit log slow query log binary log error log.
Which two statements are true about using backups of the binary log? (Choose two.) Multiple binary logs can be used to restore data Multiple binary logs can be applied in parallel for faster data restoration. Binary logs are relatively small, and therefore, excellent for long-term storage and disaster recovery. Binary logs can always be used to unapply unwanted schema changes. They allow for point-in-time recovery of the data.
Where is the default data directory located after installing MySQL using RPM on Oracle Linux 7? /usr/mysql /usr/bin /etc/my.cnf /var/lib/mysql /usr.
t is a non-empty InnoDB table. Examine these statements, which are executed in one session: BEGIN; SELECT * FROM t FOR UPDATE; Which is true? If OPTIMIZE TABLE; is invoked, it will create a table lock on t and force a transaction rollback. If OPTIMIZE LOCAL TABLE t; is invoked from another session, it executes normally and returns the status. mysqlcheck --analyze --all-databases will execute normally on all tables and return a report. If ANALYZE TABLE; is invoked from the same session, it hangs until the transaction is committed or rolled back.
Which two MySQL Server accounts are locked by default? (Choose two.) any user set as DEFINER for stored programs any internal system accounts any new ROLE accounts any user created without a password any user created with a username, but missing the host name.
Examine these commands and output: (image) Which connection ID is holding the metadata lock? 20 24 21 25 22 6.
Which two are true about binary logs used in asynchronous replication? (Choose two.) They are pushed from the master to the slave. They contain events that describe database changes on the master. They contain events that describe all queries run on the master. They contain events that describe only administrative commands run on the master. They are pulled from the master to the slave. .
You execute this command: shell> mysqlpump --exclude-databases=% --users Which statement is true? It creates a logical backup of all MySQL user accounts. It creates a logical backup of all metadata, but contains no table data. It returns an error because the mysqldump command should have been used. It creates a logical backup of only the users database.
Which two MySQL Shell commands are excluded from the InnoDB Cluster creation procedure? (Choose two.) dba.configureInstance() cluster.setPrimaryInstance() dba.configureLocalInstance() cluster.forceQuorumUsingPartitionOf() cluster.addInstance() dba.createCluster() dba.checkInstanceConfiguration().
Which two statements are true about InnoDB data-at-rest encryption? (Choose two.) It supports only non-blob datatypes. It does not support the transportable tablespaces feature. It supports all indexes transparently. It decrypts data for use in memory. It enforces encryption from disk to memory and over network transmission.
You plan to take daily full backups, which include the ndbinfo and sys (internal) databases. Which command will back up the databases in parallel? mysqldump --single-transaction > full-backup-$(date +%Y%m%d).sql mysqlpump --include-databases=% > full-backup-$(date +%Y%m$d).sql mysqlpump --all-databases > full-backup-$(date +%Y%m%d).sql mysqldump --all-databases > full_backup-$(date +%Y%m%d).sql.
What does the binlog dump thread do? It monitors and schedules the rotation/deletion of the binary logs. It reads the relay log and executes the events contained in them. It acquires a lock on the binary log for reading each event to be sent to the slave. It connects to the master and asks it to send updates recorded in its binary logs.
Which two commands will display indexes on the parts table in the manufacturing schema? (Choose two.) DESCRIBE manufacturing.parts; SELECT * FROM information_schema.statistics WHERE table_schema=’manufacturing’ AND TABLE_NAME=’parts’; SHOW INDEXES FROM manufacturing.parts; SELECT * FROM information_schema.COLUMN_STATISTICS; EXPLAIN SELECT INDEXES FROM manufacturing.parts;.
Your MySQL server is running on the Microsoft Windows platform. Which three local connection protocols are available to you? (Choose three.) named pipes shared memory SOCKET X Protocol UDP TCP/IP.
Which two are use cases of MySQL asynchronous replication? (Choose two.) You can scale writes by creating a replicated mesh. It guarantees near real-time replication between a master and a slave. You can scale reads by adding multiple slaves. MySQL Enterprise Backup will automatically back up from an available slave. It allows backup to be done on the slave without impacting the master.
Which step or set of steps can be used to rotate the error log? Execute SET GLOBAL log_error = ‘<new error log file>’. Execute SET GLOBAL max_error_count = <number of messages at point to rotate>. Execute SET GLOBAL expire_logs_days=0 to enforce a log rotation. Rename the error log file on disk, and then execute FLUSH ERROR LOGS.
You want to check the values of the sort_buffer_size session variables of all existing connections. Which performance_schema table can you query? user_variables_by_thread global_variables variables_by_thread session_variables.
Examine this command, which executes successfull mysqlbackup --defaults-file=/backups/server-my.cnf --backup-dir=/backups/full copy-back Which statement is true about the copy-back process? The copy-back process is used to overwrite a new backup over an existing backup. It restores files from the data directory to their original MySQL server locations. It restores files from the backup directory to their original MySQL server locations. The copy-back process makes inconsistent backups.
You reconfigure and start a slave that was not replicating for several days. The configuration file and CHANGE MASTER command are correct. Examine the GTID information from both master and slave: (image) Which statement is true? Replication will fail because the slave has purged more aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa transactions than the master. Replication will fail because the master does not have the required transaction with bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb GTIDs in its binary logs. Replication will fail because the master has already purged transactions with cccccccc-cccc-cccc-cccc-cccccccccccc GTIDs. Replication will fail because of inconsistent numbers in cccccccc-cccc-cccc-cccc-cccccccccccc GTIDs. Replication will work.
You have a MySQL system with 500 GB of data that needs frequent backups. You use a mix of MyISAM and InnoDB storage engines for your data. Examine your backup requirement: The MySQL system being backed up can never be unavailable or locked to the client applications. The recovery from the backup must work on any system. Only 1 hour of data can be lost on recovery of the backup. Which option fulfills all backup requirements? Take a physical backup of the MySQL system. Use the Clone Plugin to copy the data to another MySQL system. Take a logical backup of the MySQL system. Take your backup from a slave of the MySQL system.
A colleague complains about slow response time on your website. Examine this query and output: [image] What is the most likely cause for the high number of lock waits? You use the MyISAM storage engine for most common tables. You use the InnoDB storage engine and statements wait while data is inserted. The Innodb Buffer pool is full. Your table accesses wait for the operating system level flush.
You have configured MySQL Enterprise Monitor to monitor your MySQL server. Which four features are available? (Choose four.) starting and stopping the MySQL instance tracing import and export with mysqidump deploying the MySQL agent on supported target operating system creating e-mail alerts and SNMP traps for MySQL warnings monitoring the availability of the MySQL instance analyzing executed MySQL queries monitoring of NDB Cluster API nodes.
MySQL programs look for option files in standard locations. Which method will show the option files and the order in which they are read? shell> mysqladmin --debug shell> mysql --print-defaults shell> mysqld --help --verbose mysql> SHOW GLOBAL VARIABLES;.
Which two statements are true about raw binary backups? (Choose two.) They are converted to a highly compressible binary format. The data format is identical to how MySQL stores the data on disk. They are required to obtain FIPS security compliance. The resulting files are easily human readable. They are faster than logical backups because the process is a simple file or file system copy.
Which statement is true about cold backups? They are backups taken from snapshots of a running database. They are backups taken from OS copy commands. They are good to use if only data structures must be backed up but not log files. They are good to use when many users are online accessing the database.
You have replication configured, which consists of one master and one slave on different hosts with an asynchronous replication channel between them. Your goal is to decrease the amount of data that is transferred between these two hosts. It is confirmed that the slave instance does not need to have data from the example database. Which replication filter contributes to your goal? on slave: --replicate-wild-ignore=example.% on slave: --replicate-ignore-db=example on master: --replicate-ignore-db=example on master: --binlog-ignore-db=example on slave: --binlog-ignore-db=example.
Which two are valid uses for binary logs on a MySQL instance? (Choose two.) recording the order in which queries are issued audit of all queries point-in-time recovery replication logging the duration and locks for all queries.
Which two tools are available to monitor the global status of InnoDB locking? (Choose two.) SHOW ENGINE INNODB STATUS; INFORMATION_SCHEMA.INNODB_METRICS SHOW TABLE STATUS; INFORMATION_SCHEMA.STATISTICS INFORMATION_SCHEMA.INNODB_TABLESTATS SHOW STATUS;.
You have upgraded the MySQL binaries from 5.7.28 to 8.0.18 by using an in-place upgrade. Examine the message sequence generated during the first start of MySQL 8.0.18: [image] Which step or set of steps will resolve the errors? Remove the redo logs. Replace the MySQL binaries with the 5.7.28 binaries. Prepare the tables for upgrade. Upgrade to 8.0.18 again. Execute: mysqlcheck --check-upgrade mysql columns_priv event proc proxies_priv tables_priv. Start mysqld again using the --upgrade=FORCE option. Execute: mysqlcheck --repair mysql columns_priv event proc proxies_priv tables_priv. Go to the <datadir>/mysql directory and execute: myisamchk --update-state columns_priv event proc proxies_priv tables_priv.
The mysqld instance has the connection control plugin enabled with these settings: connection_control_min_connection_delay=1000 connection_control_max_connection_delay=2000 The minimum and maximum delays need to be increased to 3000 and 5000, respectively. A command is executed: mysql> SET GLOBAL connection_control_min_connection_delay=3000; What is the result? The minimum value increases to 3000 and the maximum value increases to 4000. Only the minimum connection value is increased to 3000. The minimum connection value is changed to 2000. An error is returned.
Which two statements are true about MySQL Enterprise Backup? (Choose two.) It supports backing up only table structures. It can perform hot or warm backups. It creates logical backups. It supports the creation of incremental backups. It supports backup of a remote MySQL system. It supports restoring to a remote MySQL system.
Examine this command and output: [image] Which statement is true? Firewall_cached_entries is the number of statements found in the query cache for users in DETECTING mode. Firewall_access_denied is the number of connection attempts from prohibited hosts that are denied. Firewall_access_suspicious is the number of statements logged as suspicious for users in DETECTING mode. Firewall_access_granted is the number of connections granted from whitelisted hosts.
What is the correct syntax for using transparent data encryption with an existing InnoDB table? ALTER TABLE t1 ADD ENCRYPTED_TABLESPACE = 'Y'; ALTER TABLE t1 ENCRYPTION='Y'; ALTER TABLE t1 WITH ENCRYPTION USING MASTER KEY; ALTER TABLE t1 SET TDE = 'ON';.
Examine this command, which executes successfully: [image] Which statement is true? Only files for MySQL or Its built-in storage engines are backed Only non-encrypted files are backed up. The backup includes only data files and their metadata. Only InnoDB data and log files are backed up. Only tables stored in their own tablespaces are backed up.
How can mysql_multi be configured to allow MySQL instances to use the same port number? The instances use different user accounts unique to each instance. The instances listen on different IP addresses. The instances use different socket names. The instances have appropriate net masks set.
Given: class ConSuper { protected ConSuper()( this(2); System.out.print("3"); protected ConSuper(int a)( System.out.print(a); ) and public class ConSub extends ConSuper( ConSub()( this(4); System.out.print("1"); ConSub(int a) ( System.out.print(a); public static void main (String() ergs)! new ConSub(4); 1 } What is the result? 214 2341 234 2134.
Which three are requirements for a secure MySQL Server environment? (Choose three.) Restrict the number of OS users that have access at the OS level. Ensure appropriate file system privileges for OS users and groups. Minimize the number of non-MySQL Server-related processes running on the server host. Encrypt the file system to avoid needing exact file-system permissions. Keep the entire software stack on one OS host. Run MySQL server as the root user to prevent incorrect sudo settings.
Your MySQL instance is capturing a huge amount of financial transactions every day in the finance database. Company policy is to create a backup every day. The main tables being updated are prefixed with transactions-. These tables are archived into tables that are prefixed with archives- each month. mysqlbackup --optimistic-busy-tables="^finance\.transactions-.*" backup Which optimization process best describes what happens with the redo logs? The redo logs are backed up first, then the transaction and archive tables. The redo logs are backed up only if there are changes showing for the transactions tables. The redo logs are not backed up at all. The archive tables are backed up first, then the transaction tables and redo logs. The transaction tables are backed up first, then the archive tables and redo logs.
All MySQL Server instances belonging to InnoDB Cluster have SSL configured and enabled. You must configure InnoDB Cluster to use SSL for group communication. Which two statements are true? (Choose two.) SSL group communication must be enabled at cluster creation time by specifying createCluster ({memberSslMode: 'REQUIRED'}). Configuring SSL group communication also configures SSL distributed recovery. An existing InnoDB Cluster must be dissolved and created from scratch to enable SSL for group communication. SSL group communication can be enabled for an existing cluster, one instance at time, by setting group_replication_ssl_mode. If only some InnoDB Cluster members are enabled for SSL group communication, and --ssl-mode=PREFERRED, communication will fall back to unencrypted connection. SSL group communication requires the use of an additional set of parameters group_replication_recovery_*.
You want to dump all databases with names that start with "db". Which command will achieve this? mysqlpump --include-tables=db.% --result-file=all_db_backup.sql mysqlpump > all_db_backup.sql mysqlpump --include-databases=db --result-file=all_db_backup.sql mysqlpump --include-databases=db% --result-file=all_db_backup.sql.
Which two statements are true about the binary log encryption feature? (Choose two.) It encrypts any connecting slaves connection thread. It can be set at run time. It requires a keyring plugin. When enabled it encrypts existing binary logs. It can be activated per session.
The data in this instance is transient; no backup or replication will be required. It is currently under performing. The database size is static and including indexes is 19G. Total system memory is 32G. After profiling the system, you highlight these MySQL status and global variables: [image] The OS metrics indicate that disk is a bottleneck. Other variables retain their default values. Which two changes will provide the most benefit to the instance? (Choose two.) sync_binlog=0 max_connections=10000 innodb_log_file_size=1G innodb_doublewrite=0 innodb_flush_log_at_trx_commit=1 buffer_pool_size=24G.
Which condition is true about the use of the hash join algorithm? No index can be used for the join. The query must access no more than two tables. The smallest of the tables in the join must fit in memory as set by join_buffer_size. At least one of the tables in the join must have a hash index. .
Which three are types of information stored in the MySQL data dictionary? (Choose three.) performance metrics InnoDB buffer pool LRU management data access control lists view definitions server runtime configuration server configuration rollback stored procedure definitions.
Which two statements are true about MySQL Installer? (Choose two.) It installs most Oracle MySQL products. It performs product upgrades. It provides only GUI-driven, interactive installations. Manual download of separate product packages is required before installing them through MySQL Installer. It provides a uniform installation wizard across multiple platforms.
Your my.cnf file contains these settings: [image] You want to log queries that looked at a minimum of 5000 records and either took longer than 5 seconds to run or did not use indexes. Which contains all the settings that you need to add to or modify the slow log configuration? min_examined_row_limit=5000 long_query_time=5 log_throttle_queries_not_using_indexes=5 log_throttle_queries_not_using_indexes=5 min_examined_ row_limit=5000 long_query_time=5 long_query_time=5 min_examined_row_limit=5000 log_throttle_queries_not_using_indexes=5 long_query_time=5 log_throttle_queries_not_using_indexes=5 min_examined_row_limit=5000.
Examine this command, which executes successfully on InnoDB Cluster: dba.dropMetadataSchema() Which two statements are true? (Choose two.) Group Replication will be dissolved and all metadata purged. Group Replication is still operational, but InnoDB Cluster must be reimported under MySQL Shell. The mysql_innodb_cluster_metadata schema is dropped from the instance where the connection was established. The command drops the mysql_innodb_cluster_metadata schema and re-creates it. The mysql_innodb_cluster_metadata schema is dropped from all reachable members of the cluster. Connections driven by MySQL Router are not affected by the command.
You have a MySQL client installed on your Linux workstation with a default installation. You have your admin login credentials to connect to a MySQL server running Microsoft Windows on remote host 192.0.2.1:3306. You wish to connect directly to the world database. Which four options need to be specified to complete this task with a single command? (Choose four.) --shared-memory-base-name=world --protocol=UDP --protocol=pipe --password --user=admin --host=192.0.2.1 --socket=/tmp/mysql.sock --port=3306 --database=world.
Examine this partial output for InnoDB Cluster status: [image] Which statement explains the state of the instance deployed on host2? It can be recovered from a donor instance on host3 by cloning using the command cluster.rejoinInstance ('<user>@host3:3377') It can rejoin the cluster by using the command cluster.addInstance('<user>@host3:3377') It has been removed from the cluster by using the command STOP GROUP_REPLICATION; It can rejoin the cluster by using the command dba.rebootClusterFromCompleteOutage() It has been expelled from the cluster because of a transaction error.
You are using an existing server with a new configuration. MySQL Server fails to start. Examine this snapshot of the error log: [image] Which action would allow the server to start? Remove ib_logfile0 and ib_logfile1 files from the file system. Execute mysqladmin flush-logs. First run mysqld --initialize to refresh the Size of ib_logfile. Create a new ib_logfile0 file of size 26214400.
You are asked to review possible options for a new MySQL instance. It will be a large, busy reporting data warehousing instance. [mysql] innodb_data_file_path= Which two configurations would satisfy long-term storage demands? (Choose two.) ibdatal:12M;ibdata2:12M;ibdata3:12M ibdatal:12M:autoextend;ibdata2:12M:autoextend ibdatal:12M:autoextend ibdatal:12M;ibdata2:12M:autoextend ibdatal:12M ibdatal:12M;/tmp/ibdata2:12M:autoextend.
Which three sets of item information are visible in the mysql system database? (Choose three.) help topics performance monitoring information plugins information about table structures audit log events rollback segments time zone information and definitions.
Which statement is true about InnoDB persistent index statistics? Updating index statistics is an I/O expensive operation. Index statistics are calculated from pages buffered in the buffer pool for tables with InnoDB storage engine. Setting innodb_stats_auto_recalc=ON causes statistics to be updated automatically when a new index is created. Execution plans based on transient index statistics improve precision when innodb_stats_persistent_sample_pages is increased. Increasing innodb_stats_persistent_sample_pages determines higher pages scanning speed, at the cost of increased memory usage.
Report abuse