Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I try to access mysql I get this:

$ sudo mysql -h localhost -u webmaster 
[sudo] password for webmaster: 
/usr/local/bin/mysql: 1: /usr/local/bin/mysql: Syntax error: "(" unexpected

I used the tutorial on Ubuntu to set it up. How can I fix this?

share|improve this question
Well, either the tutorial is wrong or you've made a mistake - there's a syntax error in /usr/local/bin/mysql - which actually makes me think BOTH are true - you're following a wrong tutorial and you made a mistake :) Why is your mysql in /usr/local? Are you compiling from source? Why? To install mysql, all you need is sudo apt-get install mysql –  Sergey Dec 22 '12 at 20:16
Please link to the actual tutorial! –  Jorge Castro Dec 22 '12 at 20:58

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.