Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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