Blog Archives

How will you make MySQL system secure against attackers?

We can use following best practices to make MySQL secure against attackers: Password: Each MySQL account should have a password. Also the password should be strong enough so that it can not be cracked by an attacker. Unix account: Only

Posted in MySQL, MySQL Interview Questions

How can you protect your MySQL server against Denial of Service attacks?

In a Denial of Service attack, a malicious user may load the server with so many unwanted requests that the system becomes very slow and almost unusable to most of the other genuine users. We can use following techniques to

Posted in MySQL, MySQL Interview Questions

What is the limitation of mysqldump?

Since mysqldump is a logical backup it is not useful for taking backup of a database with large tables. mysqldump loads an entire table’s data in memory before writing it to dump. Since memory is a limited resource, it is

Posted in MySQL, MySQL Interview Questions

Can we run Javascript or Python code in MySQL?

MySQL provides a tool called mysqlsh to run Javascript or Python code in a MySQL shell. We can use it to execute the code from Javascript and Python. On calling mysqlsh, a new shell is created within regular shell. In

Posted in MySQL, MySQL Interview Questions

What are user-defined variables in MySQL?

In MySQL we can create user-defined variables. We can store a value in a user-defined variable in one statement and later use it in subsequent statements. User-defined variables are specific to a session. A user-defined variable can not be shared

Posted in MySQL, MySQL Interview Questions

How will you optimize a SELECT query in MySQL?

We can use following options to increase the speed of a SELECT query in MySQL: Index: We can create index on the columns that are used in WHERE clause of SELECT statement. Function Isolation: We can check whether a function

Posted in MySQL, MySQL Interview Questions

What are the different optimization techniques in MySQL?

Some of the optimization techniques in MySQL are as follows: Range Optimization: In this case we can use a single index to retrieve the subset of data from a table. Now the server has to work on less amount of

Posted in MySQL, MySQL Interview Questions

How can we optimize INSERT query in MySQL?

We can use following techniques to optimize INSERT queries in MySQL: Values: For inserting multiple rows in a table we can pass multiple VALUES as a list in an INSERT statement. It is faster than using single row INSERT per

Posted in MySQL, MySQL Interview Questions

What is the order of privileges in MySQL?

In MySQL, there is a hierarchical system of privileges. The order is as follows: Global Host Level Database Level Table specific Column specific For each of these levels there is a separate grant table in the MySQL database.

Posted in MySQL, MySQL Interview Questions

Is it ok to mention a table name in lower case while creation and in uppercase while retrieving data from MySQL DB?

MySQL is a case sensitive platform. We have to specify the object names in same case all the times. Generally on all the Unix based platforms MySQL enforces case-sensitive rule for object names. In Microsoft Windows based installation MySQL does

Posted in MySQL, MySQL Interview Questions