How do I Interupt a long query in the mysql command line tool without quitting mysql? -


Debugging SQL Statement, if I execute a query to use the mysql command line by accident, which results in many results (Even if the query implements itself in a reasonable time), the only way I know is to stop the endless stream of output is CTRL-C.

Unfortunately this puts me back in the shell, I force to login again from the database.

To avoid this I have started running mysql with the - sigint-ignore option so that CTRL-C can be ignored.

Now I have a way to interrupt the output of those long questions

Is there a keyboard shortcut that will do this?

You have to pass - pager to your output on the pager, such as less which will give you control over the output. Storing, searching and even accumulating better production from your terminal window does not even kill you, but it gives you it.

- Secure Update or U switch aka - i-am-a-dummy which is invisible Update s and delete s and select Auto Limit 1000 (Revised with select_limit).

All of this can be set by default in ~ / .my.cnf .

  [Mysql] Pager Safe-Update  

Comments