100 MySQL interview questions
Tags: database, mysql
Published: 2020-02-25 05:55:17

MySQL Interview Questions
I am sharing a list of 100 MySQL interview questions. I have included cloud DBA interview questions with some advance scenarios like inhouse to cloud migration. The main idea behind this post is to share 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 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 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 center to AWS aurora? Is it possible to cutover from a local data center 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 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 we avoid conflicts if we setup 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 trouble query performance?

 

21. What is cardinality and for which purpose do you use this?

 

22. What is Partitioning and for which purpose 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 as per you 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 and are you going to check to resolve that issue?

 

27. What is a slow or delayed replica set? In which scenario we use delayed or slow replica set?

 

28. How to create a slow and delayed replica set?

 

29. Why we use a delay replica set? Give a Business or realtime 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 two MySQL RDS database one is Primary and Secondary is 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 alert?

Scenario: How to get an alert email or page if MySQL slave delay is more than 5 minutes?

 

36. I took the full backup on Sunday 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 a Puppet or Ansible? If yes how to do that give the steps? or give the Ansible Module Name?

Remaining 61 questions are in my MySQL Interview Questions ebook.
You can Download your copy using the right-hand side orange Popup.

https://www.thedbadmin.com/list-of-100-mysql-interview-questions/