- Home
- Interview Questions
- MySQL
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.
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.
10.
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.