Autocompletion in the MySQL command-line client Autocompletion in the MySQL command-line client mysql mysql

Autocompletion in the MySQL command-line client


Edit or create a file called .my.cnf in your home directory, containing:

[mysql]auto-rehash


To enable autocomplete within the MySQL prompt type:

mysql> \#

After that you can type:

mysql> describe someTableW[TAB]

To get:

mysql> describe someTableWithRidiculousLongName


start MySQL console with additional option --auto-rehash, i.e.

mysql --auto-rehash -u root -p