Log in to MySQL without password prompt

To allow you to log in to MySQL without having to type a password at the prompt, add your password to a file called .my.cnf in your home directory.

[client]
password=your_pass

Important: Make sure the file is readable only to you, by changing its permissions to r-------- (400) or rw------- (600):

chmod 600 .my.cnf

References

MySQL :: MySQL 6.0 Reference Manual :: 5.5.6 Keeping Your Password Secure

Last modified: 25/06/08 20:07:16
Go to top

Related Pages

No related pages or links.

Login/out

Login

Forgot Password?
Go to top
Go to top