I am sharing a list of 100 MySQL interview questions. I have included cloud DBA interview questions with some advanced scenarios like in-house to cloud migration. The main idea behind this post is to share the common latest questions. Some of MySQL interview questions are with hints. After reading my list of MySQL interview questions you can get an overview of some advanced concepts too.
I am sharing only a few questions here to reduce the post size. I have created an ebook with all the questions. You can get your copy of the ebook using the orange website bar.
1. How to install MySQL on Linux
--Hits rpm tarball (tar.gz or zip) yum Docker commands (Pull Docker Image)
2. Tell me two ways to install MySQL on Linux
3. How to check MySQL port from MySQL command line and Linux command?
--Commands Reference mysql> select @@port mysql> SHOW GLOBAL VARIABLES LIKE 'PORT'; netstat -tlnp lsof -n | grep 'mysql.*TCP' cat /etc/mysql/my.cnf | grep 'port' tail -f /var/log/mysql/mysqld.log lsof -i TCP:3306
4. MySQL database size has grown to 4 TB. How to take an incremental backup weekly to reduce the backup time? And if you have a master and slave database setup from which node you will schedule the incremental backup? Master or Slave?
--Hint Percona XtraBackup Oracle Enterprise Backup cluster control
5. Is it possible to run MySQL on a non-default port other than 3306?
6. How to migrate a database from a local data centre to AWS aurora? Is it possible to cutover from a local data centre to Amazon Web Services (AWS) or Microsoft Azure or GCP (Google Compute Platform) without downtime?
7. How to make or promote slaves as masters without any Downtime?
8. What is the difference between file-based replication and GTID-based replication?
9. How many types of Binlog formats are available and what is the difference between them?
10. How will you check whether my InnoDB buffer pool utilizing properly or not?
11. Difference between Master-Slave and Master-Master Replication?
12. How we can resolve replication errors?
13. How do we avoid conflicts if we set up Master-Master Replication?
14. What parameters need to be enabled while setting up Master-Slave and Master-Master Replication?
15. Which is the fast mechanism to take the backup of MariaDB or MySQL?
16. How to identify deadlock in MySQL.
--Hint innodb_print_all_deadlocks
17. If Replication is broken then how can we resync it without downtime?
18. How you will find a slow Query and how will you make it fast?
19. My Database is growing dramatically, is there any way to compress it or will you make it easily accessible?
20. How can you troubleshoot query performance?
21. What is cardinality and for which purpose do you use this?
22. What is Partitioning and for which purpose do we use partitions in MySQL Tables? Give a few real-time examples.
23. If my database is corrupted and MySQL service is not getting started, then how you will troubleshoot and make the database available?
24. How can you check if any table is corrupted and how you will repair that?
25. We have run MySQL Dump, and the dump is running after some time it throws an error stating that this view or stored procedure defer does not find or you use not able to run show create a statement. How will you troubleshoot and what causes that error?
26. I am running one query and it’s taking a very long time to run, indexes are in place but not sure whether that indexes are utilized or not. How will you start to troubleshoot that issue? what are you going to check to resolve that issue?
27. What is a slow or delayed replica set? In which scenario do we use a delayed or slow replica set?
28. How to create a slow and delayed replica set?
29. Why do we use a delay replica set? Give a Business or real-time example.
30. Can we Reduce AWS RDS data volume size? If NO How to reduce AWS RDS Data volume size?
31. Can we recover the deleted AWS RDS / Aurora or AWS EC2 instance?
32. We have two MySQL RDS databases one is Primary and the Secondary is a read replica set.
Can we make the reading replica set to primary?
33. Can we install MySQL on Docker? if YES then what are the advantages or disadvantages if we install MySQL on Docker?
34. How to install MySQL on Docker containers?
35. How to check the MySQL slave delay? What is the command? Can we monitor the Salve delay check by Mysqladmin commands with email alerts?
Scenario: How to get an alert email or page if the MySQL slave delay is more than 5 minutes?
36. I took the full backup on Sunday at 12:00 PM IST and on Monday some of the important tables got deleted. I have all the binary log present till Monday up to SYSDATE. Can we recover all the tables?
37. How to enable SSL on the MySQL database? Can we enable SSL for Replication?
38. Why Do we need a secure connection using SSL for the database?
39. Can we install MySQL using Puppet or Ansible? If yes how to do that give the steps. or give the Ansible Module Name?
The remaining 61 questions are in my 20$ worth MySQL Interview Questions ebook Submit your email id and you will receive the ebook in Your Inbox
Read more
AWS MySQL RDS Database Creation using AWS CLI
How to Create MySQL Database with AWS RDS
How to connect to AWS MySQL / MariaDB RDS or EC2 database from MySQL WorkBench
How to Become Oracle apps DBA?
What does DBA mean?
150 Oracle DBA Interview Questions
Top 5 Future Technologies for Database Administrators (DBA) to learn in 2020