Wednesday, October 8, 2014

Linux Interview Question and Answer - Mysql part 2

10:20 AM






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

net start MySQL, net stop MySQL
 
2. How do you start MySQL on Linux? 

/etc/init.d/mysql start
 
3. Explain the difference between mysql and mysqli interfaces in PHP? 

mysqli is the object-oriented version of mysql library functions.
 
4. What’s the default port for MySQL Server? 

 3306
 
5. 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 notee.
 
6. 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 it’s not readable by others.
 
7. How do you change a password for an existing user via mysqladmin? 

 mysqladmin -u root -p password “newpassword”
 
8. Use mysqldump to create a copy of the database? 

 mysqldump -h mysqlhost -u username -p mydatabasename > dbdump.sql
 
9. Have you ever used MySQL Administrator and MySQL Query Browser? 

 Describe the tasks you accomplished with these tools.
 
10. What are some good ideas regarding user security in MySQL?

There is no user without a password. There is no user without a user name. There is no user whose Host column contains % (which here indicates that the user can log in from anywhere in the network or the Internet). There are as few users as possible (in the ideal case only root) who have unrestricted access

Written by

2 comments :

 

© 2014 Linux Storages | Updated . All rights resevered. Designed by Templateism