I have some local databases that contain lots of tables. I don't use the client's auto-complete feature, so I usually disable the auto rehash option. That makes the program loads faster. However, I forgot to add the -A when calling it. I was wondering if there is a way to set it by default without having to recompile it, perhaps through some config file. Is that possible?

I couldn't find anything related to that in the official docs, https://dev.mysql.com/doc/refman/8.0/en/mysql-command-options.html.


Try adding


to your config.

Or you can alias mysql to mysql -A at bash level by putting this in your .bashrc:

alias mysql='mysql -A'
  • I created a file at ~/.my.cnf with that entry you suggested and it worked. – Gustavo Straube Aug 24 '20 at 21:17
  • After using this setting for a while, I found out it doesn't work with mysqldump -- it's no needed actually -- then I change .my.cnf to have [mysql] instead of [client]. – Gustavo Straube Sep 2 '20 at 22:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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