MySQL, Tips and TricksMySQL command prompt auto-complete

MySQL command prompt auto-complete

If you work on the mysql command line, its nice to have an autocomplete similar to the linux bash where you press the TAB key and the commands complete.

In mysql, we can set it up to a degree to provide some hints when we type. Though it might not complete everything you type, it does complete table names etc.

2 ways to do it ( I am on CentOS 6.5 )

when you log into mysql, use the auto-rehash config option like

mysql --auto-rehash -u root -p

if this does not work, then try creating a file called .my.cnf in your home directory and put the below into it


Categories: MySQL, Tips and Tricks Tags: ,


  1. November 17, 2014 6:39 am

    Reblogged this on manish more and commented: It's Good Trick

Post a comment

Your email address will not be published. Required fields are marked *