Reverse search is not working on thesql terminal on the mac

MySQLterminal

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

Best Answer

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.