1.
Following a server crash, the automatic recovery of InnoDB fails.
How would you begin to manually repair the InnoDB tables?
2.
What are three methods to reduce Mysql server exposure to remote connections?
3.
An existing master-slave setup is currently using a delayed replication of one hour. The master has crashed and the slave must be "rolled forward" to provide all the
latest data.
The SHOW SLAVE STATUS indicates the following values:
RELAY_LOG_FILE = hostname-relay-bin.00004
RELAY_LOG_POS = 1383
Which command set would make the slave current?
4.
You have enabled the Slow Query Log for a short period.
When you process the Slow Query Log, you receive the following snip of output:
Count: 100 Time=0 .22a (22s) Lock=0.00s (0s) Rows=0.0 (0), root[root] @localhost
CREATE TABLE 't1' (id serial,id0 varchar(N) unique key,intcaoll INT (N)
,intco12 INT(N) ,intco13 INT(N) ,intco14 INT(N) ,intco15 INT(N)
,charcol1 VARVHAR(N) ,charcol2 VARCHAR(N) charcol3 VARCHAR (N)
,charcol4 VARVHAR(N) ,charcol5 VARCHAR(N) charcol6 VARCHAR (N)
,charcol7 VARVHAR(N) ,charcol8 VARCHAR(N) charcol9 VARCHAR (N) .charcol 10 VACHAR (N) )
Count: 64000 Time-0.02s (1213s) Lock=0.00s (6s) Rows=1.0 (64000), root [root]@ localhost
SELECT intocl1, intco12, intco13, intco14, intco15, intco16,intco17, intco18
,intcol9, intcol10, charcol1, charcol2, charcol3, charcol4, charcol5, charcol6
,charcol7, charcol8, charcol9, charcol10 FROM t1 WHERE id = 's'
Count: 1 Time=0.02s (0s) Lock=0.00s (0s) Rows=1.0 (1) agent [agent] @localhost
SELECT Select_priv, Repl_client_priv, Show_db_priv, Super_priv,
Process_priv FROM mysql.user WHERE CONCAT (user, 's', host) = CURRENT_USER ()
Count: 48000 Time=0.02s (778s) Lock=0.00 (3s) Rows=1.0 (48000), root[root]@localhost
SELECT intocl1,intcol2,intcol3, intcol4, intcol5, charcol1, charcol2, charcol3
,charcol4, charcol5, charcol6, charcol7, charcol8, charcol9, charcol10 FROM t1 WHERE id = 's'
You want to tune the query such that it provides the greatest overall time savings.
Which query will accomplish this?
5.
Review the definition of the phone_list view.
CHEATE OR REPLACE
ALGORITHM=MERGE
DEFINER= 'root'@localhost'
SQL SECURITY DEFINER
VIEW 'phone_list' AS
SELECT
e . id as id
'e . first_name AS 'first_name'
'e . last_name AS 'last_name'
'coalesce ( ph1.phone_no, '--') AS 'office_no'
'coalesce (ph2 .phone_no, '--') AS 'cell_no'
FROM employees e
LEFT JOIN employee_phone ph1
ON ph1.emp_id = e.id AND ph1.type = 'office'
LEFT JOIN employee_phone ph2
ON ph2 .emp_id = e.id AND ph2 .type = 'mobile'
The tables employees and employee_phone are InnoDB tables; all columns are used in this view.
The contents of the phone_list view are as follows:
Mysql> select * from phone_list;

1 row in set (0.00 sec)
Which method can you use to change the cell_no value to '555-8888' for John Doe?
6.
Consider the three binary log files bin.00010, bin.00011, and bin.00012 from which you want to restore data.
Which method would use mysqlbinlog for greater consistency?
7.
Which MySQL utility program should you to process and sort the slow Query log based on query time or average query time?
8.
Which High Availability solution can provide a consistent, time-delayed (for example, one hour) snapshot of the live production database?
9.
You adjust a default configuration to the following /etc/my.cnf on a Linux installation:
[mysqld]
Loq-bin
Binrylog_format=ROW
You do not notice the spelling error in binrylog_format and restart your production server.
How does the MySQL server behave with incorrectly spelled options?
10.
You want to create a temporary table named OLD_INVENTORY in the OLD_INVENTORY database on the master server. This table is not to be replicated to the slave server. Which two changes would ensure that the temporary table does not propagate to the slave?