What should I do if I want to cancel the wrong mysql command?

  • 2021-11-29 16:50:45
  • OfStack

I knocked an incorrect mysql command. What should I do if I want to cancel it? If you use ctrl + c, you will exit directly. What shall I do? Let's take a look:


mysql> show tables; \c
+-------------------+
| Tables_in_db_test |
+-------------------+
| tb_test      |
| tb_test_ex    |
+-------------------+
2 rows in set (0.00 sec)

mysql> show tables \c
mysql> show tabxx \c
mysql> 

If you don't know this little trick, it's annoying.

Summarize


Related articles: