# Fix Control-C in mysql command line programme?

In the mysql command line, pushing Control-C will certainly terminate the program, and also bring you back to bash. In psql, the one for postgres, it will certainly eliminate the existing question and also will certainly not stop the psql program. Exists any kind of means to get the psql design practices for Control-C in the mysql program? I maintain locating myself pushing Control-C by behavior and also needing to log back right into mysql.

Control C does not eliminate bash, and also log you out when you push it. Which I assume is a good idea. Control-C suggests 'stop what you are doing'.

10
2022-06-07 14:33:18
Source Share

If you add a bkslshc to after that end of your line as opposed to making use of Ctrl - c after that you can eliminate the line without leaving mysql.

6
2022-07-06 21:51:01
Source

Like Andy claims, it is dealt with in later variations.

There is no equal keyboard faster way in older variations.

Yet you can stop it from occurring with the adhering to CLI flag:

--sigint-ignore

Ignore SIGINT signals (typically the result of typing Control-C).

13
2022-06-07 14:55:56
Source

If you press Ctrl-C in 5.1 during query execution, it will certainly stop the implementation with the message "Query implementation was interrupted"

    mysql> INSERT INTO c SELECT rand()*1000, sha1(rand()) FROM c;
Query aborted BY Ctrl+C
ERROR 1317 (70100): Query execution was interrupted


A more Ctrl-C press eliminates the customer.

Older variations pass away badly as kept in mind concerned, so upgrade when possible

Edit:

7
2022-06-07 14:51:57
Source