I have installed MySQL. Now I am stuck inside the MySQL command prompt. I ran MySQL like this:
C:\>mysql.exe
mysql>
Then I type in some invalid command like this:
mysql> /version
->
And no matter what I type, I can't exit MySQL command-line / terminal. E.g.:
-
exit
-
CtrlC
-
CtrlD
-
quit
-
Ctrl\
-
CtrlZ
bye
How do I exit the MySQL terminal to the default terminal?
Best Answer
To add on to the other answer, you could simply end the current invalid query using a semicolon:
Or using
\G
(which is supposed to make rows display vertically):Of course, both options assume you have no opening quote. If you do, you must first close it off with an ending quote.