user1889867
user1889867

Reputation: 89

MySQL auto completion

How can I use MySQL tab completion ? The line auto-rehash is already in my my.cnf file. The completion works with select command but it doesn't work with source command.

Upvotes: 0

Views: 1496

Answers (1)

eggyal
eggyal

Reputation: 125855

You can only tab-complete SQL identifiers, not filesystem paths. As documented under --auto-rehash (emphasis added):

This option is on by default, which enables database, table, and column name completion.

You might prefer to direct your SQL source file to the stdin of the mysql command line tool using stream redirection:

$ mysql -u myuser -p mydb < /path/to/myfile.sql

Upvotes: 1

Related Questions