DEV Community

abhishekjaindba
abhishekjaindba

Posted on • Originally published at thedbadmin.com

100 MySQL interview questions

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)

  1. Tell me two ways to install MySQL on Linux

  2. 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

  1. 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

  1. Is it possible to run MySQL on a non-default port other than 3306?

  2. 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?

  3. How to make or promote slaves as masters without any Downtime?

  4. What is the difference between file-based replication and GTID based replication?

  5. How many types of binlog formats are available and what is the difference between them.

  6. How will you check my InnoDB buffer pool utilizing properly or not?

  7. Difference between Master-Slave and Master-Master Replication?

  8. How we can resolve replication errors?

  9. How we avoid conflicts if we setup Master-Master Replication?

  10. What parameters need to be enabled while setting up Master-Slave and Master-Master Replication.

  11. Which is the fast mechanism to take the backup of MariaDB or MySQL?

  12. How to identify deadlock in MySQL.

--Hint
innodb_print_all_deadlocks

  1. If Replication is broken then how can we resync it without downtime?

  2. How you will find a slow Query and how will you make it fast?

  3. My Database is growing dramatically, is there any way to compress it or will you make it easily accessible?

  4. How can you trouble query performance?

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

  6. What is Partitioning and for which purpose we use partitions in MySQL Tables? Give a few real-time examples?

  7. If my database is corrupted and MySQL service is not getting started, then how you will troubleshoot and make the database available?

  8. How can you check if any table is corrupted and how you will repair that?

  9. 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?

  10. 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?

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

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

  13. Why we use a delay replica set? Give a Business or realtime example?

  14. Can we Reduce AWS RDS data volume size? If NO How to reduce AWS RDS Data volume size?

  15. Can we recover the deleted AWS RDS / Aurora or AWS EC2 instance?

  16. We two MySQL RDS database one is Primary and Secondary is read replica set.
    Can we make the reading replica set to primary?

  17. Can we install MySQL on Docker? if YES then what are the advantages or disadvantages if we install MySQL on Docker?

  18. How to install MySQL on Docker containers?

  19. 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?

  1. 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?

  2. How to enable SSL on the MySQL database? Can we enable SSL for Replication?

  3. Why Do we need a secure connection using SSL for the database?

  4. 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/

Top comments (0)