Mysql Interview Questions

MySql is a multi-threading, multi-user open source SQL database management system. It is typically used for web application development, and often accessed using PHP.

Read Best MySql Interview Question and answers

#1 How do you start MySQL on Linux?

/etc/init.d/mysql start command is used for start MySQL on Linux

#2 What is mysqldump ?

mysqldump is a client program that creates logical backups of database.

#3 What is difference between Inner vs Self vs Cross?

#4 What is difference between Group by and order by clause?

#5 What is mysqlcheck do ?

mysqlcheck is a client program that check the integrity of database tables.

#6 Explain advantages of InnoDB over MyISAM?

Advantages of InnoDB over MyISAM

  • Row-level locking
  • transactions
  • foreign key constraints
  • crash recovery

#7 How to store binary data in mysql?

If you have to store the short piece of data like password hashes then it is advised to store it in VARCHAR.

If you need to store arbitrary chunks of binary data then BLOB is the desired product to store the data.

#8 Command to list all Databases in MySql ?

#9 What is MySql ?

MySql is a multi-threading, multi-user open source SQL database management system .
It is typically used for web application development, and often accessed using PHP.

#10 Write command to import an mysql file?

Run below command on the terminal to import a MySQL database from the file

mysql -u username -p database_name < file.sql 

#11 What are the types of database engines available in MySQL?

#12 Explain the difference between MyISAM Static and MyISAM Dynamic. ?

In MyISAM static all the fields have fixed width. The Dynamic MyISAM table would include fields such as TEXT, BLOB, etc. to accommodate the data types with various lengths. MyISAM Static would be easier to restore in case of corruption, since even though you might lose some data, you know exactly where to look for the beginning of the next record.

#13 Explain Triggers and Stored Procedures?

#14 What are HEAP tables in MySQL?

HEAP tables are in-memory. They are usually used for high-speed temporary storage. No TEXT or BLOB fields are allowed within HEAP tables. You can only use the comparison operators = and < =>. HEAP tables do not support AUTO_INCREMENT. Indexes must be NOT NULL.

#15 Explain Timestamp ?

Timestamp is a data type that exposes automatically generated binary numbers, which are guaranteed to be unique within a database. timestamp is used typically as a mechanism for version-stamping table rows. The storage size is 8 bytes.

Ask a Question