Mysql Interview Questions

Mysql Interview Questions Download Mysql Interview Questions PDF

Mysql Interview Questions

Tee followed by a filename turns on MySQL logging to a specified file. It can be stopped by command note.

“i_am_a_dump” enables MySQL engine to refuse any UPDATE or DELETE statement to execute if the WHERE clause is not present.

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.

MySql default port number is 3306

The following table describes the maximum length for each type of identifier.

  • Database 64 bytes
  • Table 64 bytes
  • Column 64 bytes
  • Index 64 bytes
  • Alias 255 bytes

There are some restrictions on the characters that may appear in identifiers.

Advantages of InnoDB over MyISAM

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

Both Unix timestamp and MySQL timestamp are stored as 32-bit integers but MySQL timestamp is represented in readable format of YYYY-MM-DD HH:MM:SS format.

mysqldump -h mysqlhost -u username -p mydatabasename > dbdump.sql

MySQL set can take zero or more values but at the maximum it can take 64 values.

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.

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

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

mysql -u john -p command will prompt for the password for user john before allowing access to the database management system.

If your database server requires a username and password to gain access the -u and -p command-line options.