MySQL Interview Answers
- How do you start and stop MySQL on Windows?
net start MySQL, net stop MySQL
- How do you start MySQL on Linux?
/etc/init.d/mysql start
- Explain the difference between MySQL and MySQLi interfaces in PHP?
mysqli is the object-oriented version of mysql library functions.
- What's the default port for MySQL Server?
3306
- 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
- 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
- How do you change a password for an existing user via MySQLadmin?
mysqladmin -u root -p password "newpassword"
- Use MySQLdump to create a copy of the database?
mysqldump -h mysqlhost -u username -p mydatabasename > dbdump.sql
- Explain the difference between MyISAM Static and MyISAM Dynamic
In MyISAM static all the fields have fixed width. The Dynamic MyISAM table would include fields such as TEXT, BLOB, etc. to accommodate the data types with various lengths. MyISAM Static would be easier to restore in case of corruption, since even though you might lose some data, you know exactly where to look for the beginning of the next record.
- What does myisamchk do?
It compressed the MyISAM tables, which reduces their disk usage
Click on the link to search and apply for MySQL jobs
Answers sourced from www.techinterviews.com
Comment
Log in or create your account to react to the article.