Saving MySQL access credentials for your Linux User

To keep entering your access credentials everytime you need to connect to your MySQL database, you can store them on your user folder. Just create a .my.cnf file such as:

[client]
 user=your_username_here
 password=your_user_password_here
 socket=/var/run/mysqld/mysqld.sock

You can chmod 0600 that file to keep other users from reading it.