MySQL DBA Interview Questions
MySQL DBA Interview Questions
A. Connection Manager
B. Query Optimizer
C. Pluggable Engines.
2. What are the major differences between MySQL 5.1 and 5.5?
Answer: The Major difference I know is that the default engine was myisam in 5.1 and
innodb in 5.5
5. Which engine would you prefer for production OLTP environment and why?
after installation you should change the location of bin logs and data files on the different
physical disks.
Answer: RAID 10
8. How do you upgrade from one mysql version to another mysql version?
1
MySQL DBA Interview Questions and Answers - Series 1
Answer: General Log, Error Log, Binary Log and Slow Query Log
Answer: slow query log might be very huge in size and query could be listed thousand
times. to summarize the slow query log in a very informative way there is third party tool
available 'pt-query-digest' which is a part of percona tool kit freely downloadable.
status
13. If the mysql server is performing slow than how to find out the process which
is causing problem.
14. What do you do if the end user complains about the performance of the DB?
Answer: show processlist will show the processes which taking resources at db server and
the do the rest diagnosis.
Answer: study the explain plan and create necessary indexes if required.
16. Where do you change the performance parameters of mysql and by default
where is the file located on a unix system?
17. Which are the important performance parameters for MyISAM and InnoDB?
Answer:
For MyISAM:
key_cache_size
thread_cache_size
tmp_table_size
max_heap_table_size
read_buffer_size
query_cache
2
MySQL DBA Interview Questions and Answers - Series 1
For InnoDB:
innodb_buffer_pool_size
innodb_buffer_pool_instances
innodb_log_file_size
innodb_log_buffer_size
tmp_table_size
max_heap_table_size
table_open_cache
19. What are the disadvantages of having a big Query cache size?
Answer: query cache puts an additional overhead on the database. it required the db to
work on invalidating the queries from the query cache.
Answer: No.
24. How to check the table fragmentation and resolve if the fragmentation is
found?
alter table < table returned from pervious query > engine=innodb;
25. How to change the root password if the root password is lost?
3
MySQL DBA Interview Questions and Answers - Series 1
Answer: start the Db with --skip-grants-table. Change the password and restart the db in
normal mode.
Answer: if the data disk is full then create a soft link and move the .frm and .idb files to the
linked location.
Answer: point # 26 can only be done in file per table is enabled at innodb level.