0

I'm used to having tab-completion for mysql keywords, database names etc in mysql, but in my freshly installed mysql (via 'apt-get install mysql-server') it only works for table names, not database names.

I am supplying the --auto-rehash option when starting the mysql command line client interface. I'm aware that I can set this as a default via my.cnf, but I want to get it working first.

The mysql docs tell me that the auto-rehash feature "requires a MySQL client that is compiled with the readline library."

'aptitude show mysql-client' tells me that I have 5.5.43-0ubuntu0.14.04.1.

For debugging purposes, how can I know if my mysql-client has readline, and if not, how do I get one that does?

  • 1
    Try issuing the command rehash and see if it works – Mitch May 8 '15 at 12:34
1

Resolved: I wasn't specifying a database name when invoking the mysql command line interface!

Auto-completion works as expected if I go in as:

mysql -u root -p mysql # or mysql -u root -p mydatabase

as opposed to:

mysql -u root -p

(and --auto-rehash clearly is on by default as per the docs)

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.