200mg
200mg

Reputation: 531

Forgot to type ; at end of mysql statement, how to go back?

How do I recover from the below? I need to get back to the maria prompt, i've tried exit and quit neither work. Currently just using ctrl-c which required me to log back in to mysql.

MariaDB [(none)]> DROP DATABASE drupal_db
    ->

Upvotes: 1

Views: 3924

Answers (3)

Farid Niasti
Farid Niasti

Reputation: 41

You can do it with \c It will move your cli to previous state

Upvotes: 2

cctan
cctan

Reputation: 2023

You can't. Your only option is to end the query and [Ctrl]+[C] out.

See this.

Upvotes: 0

Niagaradad
Niagaradad

Reputation: 463

you don't have to have the ; on the same line as your command so you can just put it on the next line by itself. If you find in some place you've made an error like dropping a single or double quote you can use \c to exit to the next line of the shell.

Upvotes: 2

Related Questions