Skip to navigation

MySQL settings in ~/.my.cnf

You can specify default settings for MySQL in the file ~/.my.cnf (create it if it doesn’t exist). E.g., you could spare yourself typing your password each time you connect with an entry in that file like this:

[client]
password='mypassword'

This gets loaded in addition to the system configuration file, which for me is at /etc/mysql/my.cnf.

Comments are closed.