I have a [client] option group with my local credentials for my database, which lets me quickly access my database from the CLI.

Can I set something up the same way in this file so that I can access the databases for my production databases or development databases - hosted on different servers - so I don't have to remember or lookup the credentials or hosts?

link|improve this question

71% accept rate
feedback

1 Answer

up vote 1 down vote accepted

You can create additional configuration files using the same format then reference the alternate config files with a command line option.

mysql --defaults-extra-file=prod.cnf
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.