Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This function works on 5.0.75 on Ubuntu, but not on 5.1.44 on OSX (Lion):

mysql --database=sps --host=localhost --user=root --password=somepass -e "SELECT 1;"

The expected output is this:

| 1 |
| 1 | 

On OSX, though, it just dumps me to a mysql prompt awaiting a command, without ever executing the command specified by the -e switch.

Any idea why it doesn't execute and exit back to the command line as it should?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.