Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .