Tuesday, September 4, 2012

Mysql Interview questions



1.  How do you start and stop Mysql on Windows?
    Ans- Net start Mysql, net stop Mysql
2.   How do you start Mysql on Linux?
Ans- /etc/init.d/mysql start
3.  Explain the difference between mysql and mysqli interfaces in PHP?
Ans- Mysqli is the object oriented version of mysql library functions.
4.  What’s the default port MySql Server?
Ans- 3306
5.   What does tee command do in Mysql?
Ans- tee followed by a filename turns on MySQL logging to a specified file. It can be stopped by command note.
6.   Can you save your connection settings to a conf file?
Ans- Yes, and name it~/.my.conf. You might want to change the permissions on the file to 600, so that it’s not readable by others.
7.  How do you change a password for an existing user via mysqladmin?
Ans- mysqladmin
-u root –p password “newpassword”
8. Use mysqldump to create a copy of the database?
     Ans- mysqldump –h mysqlhost –u

9.   Have you ever used Mysql Administrator and Mysql Query Brower? Describe the tasks you accomplished with these tools.

10. What are some good ideas regarding user security in MySQL?
Ans- There is no user without a password. There is no user without a user name. There is no user whose Host column contains % .


No comments:

Post a Comment