Take the 2-minute tour ×

I'm working with Terminal (Mac OS X), but I think this is a built-in part of Linux. Sometimes, when I execute a command, Terminal returns a new, indented line with just -> on the line. It seems like it's waiting for something, but I don't know if it requires action on my part or not. Pressing enter simply returns another, identical line. When I Ctrl + C, it says Aborted, meaning something was clearly processing. What does this mean? For example, the following:

$ mysql -u root -h host -p
Enter password:

Your MySQL connection id is X
Server version: 5.1.39-log MySQL Server


mysql> mysqldump my_database
    -> [Ctrl + C]
    -> Aborted

Edit: Seems this is faulty syntax for the command, but I'm not sure that is the reason for the arrows.

share|improve this question
Actually, OS X is Unix. GNU/Linux is a very similar but not directly related operating system. –  AndrejaKo Jul 5 '10 at 15:18
And in this specific case you probably did NOT want to execute mysql first. Just run mysqldump my_database by itself, outside of the MySQL prompt. –  Arjan Jul 5 '10 at 18:20
Bash shell will do similar with an unclosed quote. –  Rob Apr 30 '12 at 18:55

3 Answers 3

up vote 12 down vote accepted

In the MySQL command-line tool that means the tool expects your input to continue on the next line. Here it is waiting for the destination path.

Common "full" SQL commands are written with indents, which is supported at the command line. You would say something like

    `users`.`is_active` = 1 AND
    `users`.`age` < 13
share|improve this answer

The arrows are an interactive continuation prompt. If you enter an unfinished command, the SQL shell (invoked by the mysql command) is waiting for the rest of it.

In this particular case, the SQL shell is waiting for a destination path for the mysqldump.

Also, commands aren't complete until you terminate commands with a semicolon. (Thanks @MrStatic)

share|improve this answer
In this particular case, it's not the shell that's waiting - it's mysql. However, you are otherwise correct. –  Dennis Williamson Jul 5 '10 at 15:53
To add further the way you can tell a command, atleast in mysql, is unfinished you did not end with a ';' –  MrStatic Jul 5 '10 at 16:00
@Dennis Sorry for my imprecise wording - Technically, it is a "SQL shell" (see dev.mysql.com/doc/refman/5.1/en/mysql.html) but yes, it's not the bash/zsh unix shell… I will edit my answer. –  ghoppe Jul 5 '10 at 17:04

You do indeed have a syntax error; SQL commands must end with a semicolon. For example:

mysqldump my_database;
share|improve this answer

Your Answer


