goofy — 2006-01-22T00:53:18-05:00 — #1
I'm a newbie to mySQL and I was trying to insert some data into the database from the mysql command prompt but I've stuffed up and I'm stuck at a command prompt like the following
but I don't know how to get back to the mysql command prompt without closing the terminal window.
r937 — 2006-01-22T07:02:58-05:00 — #2
possibly it's waiting for you to close a string, try entering a single quote
goofy — 2006-01-22T07:48:20-05:00 — #3
i ended up just closing the terminal window. Is there anyway to exit the sql command prompt if you get the syntax wrong and can't work out how to fix it?
guelphdad — 2006-01-22T10:23:03-05:00 — #4
look at Rudy's explanation.
If you enter ('2006-01-01); then you are missing a single quote thus instead of seeing
on the prompt you got
so you just now need to enter
which is the character being asked for and then the semi-colon to close the command off.
if you are missing a double quote you would see
just enter ";
to close it off.
closing the window won't hurt anything either.
also one other thing to note, if you realize you have made an error in your query and you want to go back and fix something enter \c at the prompt and then you will end your query and just go back to the prompt.