MySQL console: Ctrl+C driving me nuts

interfaceMySQLmysql-console

There is something in the MySQL console that drives me nuts. When I hit ctrl+c to cancel the current command being typed, the terminal exits.

In every terminal I know (*nix terminals, Python, PostgreSQL), ctrl+c cancels the current command and ctrl+d exits the terminal.

This issue has been reported at 2003, and bumped several times since.

Is there a way to:

  • Change this behaviour, or
  • Convince the MySQL dev team that this is really annoying?

Best Answer

To change the behaviour, download the source for the mysql CLI and modify the SIGINT handler to behave as you see fit, then recompile & install.