I was using the mysql in ubuntu terminal. Reverse search was working fine on my ubuntu terminal. Recently I switched to mac, on mac terminal reverse search works fine normally but when I logged in to mysql the reverse search was not working.

Please suggest some answers I will be using reverse search frequently.

Reverse search is a bash functionality where you search your command history on the fly. More on reverse search can be found here

  • What do you mean by „reverse search“?
    – nohillside
    Jul 5, 2018 at 9:55
  • Presumably Ctrl+R in bash? I have no idea what the problem could be (I don’t use bash or mySQL) but the default bash that comes with macOS is a long way behind the latest. Potentially upgrading using Homebrew (brew install bash) might fix the problem you’re seeing? Jul 5, 2018 at 10:15
  • @nohillside You can find what is reverse search here lifehacker.com/278888/… Jul 6, 2018 at 8:59
  • In this case once you call mysql it is responsible for the keyboard not bash so we need to know how mysql was compiled and does it include the correct keyboard handling
    – mmmmmm
    Jul 6, 2018 at 9:21

1 Answer 1


Reverse search as triggered by Ctrl-R is a functionality provided by bash and which searches within the shell's command history. Once you start mysql you rely on the keyboard combinations available there, you can't use the bash shortcuts while mysql is running.

If you want to use reverse search with mysql you need a version with readline support compiled into it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .