rbkjefkj
rbkjefkj

Reputation: 25

Can't exit MySQL with quit ):

It now shows: mysql> and then, I type quit and hit enter and in the next line, it just shows mysql> again ): I also tried ctrl+c. I'm on Linux.

Oh exit worked. But like I swear I tried it before and it didn't work!

Upvotes: 0

Views: 4502

Answers (2)

On Windows, I could exit MySQL with "exit" or "quit" commands below:

mysql> quit
Bye
mysql> exit
Bye

Upvotes: 0

tadman
tadman

Reputation: 211610

The method to quit the interactive MySQL shell is \q as per the documentation.

exit on its own will work, but if you were in the middle of a SQL statement it won't, so like:

mysql> SELECT * FROM
    -> exit

This is presumed to be a table name. \q will work instead.

Upvotes: 2

Related Questions