MySQL Interview Questions & Answers

Showing 10 of 69 questions | Page 4

Technical interview questions and answers are essential when preparing for a MySQL Interview because companies want to evaluate your understanding of database queries, joins, functions, table design, indexing, and optimization techniques. MySQL is widely used in web applications, making it one of the most important skills for developers, database engineers, and backend programmers. Companies like TCS, Wipro, Infosys, Cognizant, and Accenture frequently include MySQL questions in technical rounds and placement tests. This guide provides the most asked MySQL interview questions with explanations to help freshers and job seekers strengthen their SQL fundamentals. Preparing these questions will help you perform confidently in SQL coding tests, backend interviews, and campus placements.

Database developers can broaden their expertise through DBMS theory and MS SQL Server implementation

Showing 10 of 69 questions

31. What are ENUMs used for in MySQL?

You can limit the possible values that go into the table. CREATE TABLE months (month ENUM ‘January, ‘February, ‘March,…); INSERT months VALUES (April);

32. How are ENUMs and SETs represented internally?

As unique integers representing the powers of two, due to storage optimizations.

33. How do you start and stop MySQL on Windows?

net start MySQL, net stop MySQL

34. How do you start MySQL on Linux?

/etc/init.d/mysql start

35. Explain the difference between mysql and mysql interfaces in PHP?

mysqli is the object-oriented version of mysql library functions.

36. whats the default port for MySQL Server?

3306

37. What does tee command do in MySQL?

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

38. Can you save your connection settings to a conf file?

Yes, and name it ~/.my.conf. You might want to change the permissions on the file to 600, so that Its not readable by others.

39. How do you change a password for an existing user via mysqladmin?

mysqladmin -u root -p password "newpassword"

40. Use mysqldump to create a copy of the database?

mysqldump -h mysqlhost -u username -p mydatabasename > dbdump.sql
Questions and Answers for Competitive Exams Various Entrance Test