More DBA job interview questions and answers at
(Continued from previous question...)
MySQL - User Names and Passwords
There are several distinctions between the way user names and passwords are used by MySQL and the way they are used by Unix
User names, as used by MySQL for authentication purposes, have nothing to do with Unix user names (login names) or Windows
user names. Most MySQL clients by default try to log in using the current Unix user name as the MySQL user name, but that is
for convenience only. Client programs allow a different name to be specified with the -u or --user options. This means that
you can't make a database secure in any way unless all MySQL user names have passwords. Anyone may attempt to connect to the
server using any name, and they will succeed if they specify any name that doesn't have a password.
MySQL user names can be up to 16 characters long; Unix user names typically are limited to 8 characters.
MySQL passwords have nothing to do with Unix passwords. There is no necessary connection between the password you use to log
in to a Unix machine and the password you use to access a database on that machine.
MySQL encrypts passwords using a different algorithm than the one used during the Unix login process.
Note that even if the password is
stored 'scrambled', and knowing your 'scrambled' password is enough to be able to connect to the MySQL server!
(Continued on next question...)