Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

I just upgraded Ubuntu 11.10 to 12.04 (installed within windows 7) and during installation the process asked me to set my Mysql root password. According to Ubuntu Documentation, Mysql server is pre-istalled in Ubuntu version 12.04.

However, when I search for "Mysql command line client" in the Dash Home, the following files are shown:

  1. Mysql 5.5 command Line Client.lnk
  2. qa_auth client.dll
  3. mysqlclient.lib
  4. client plugin.h

When I open the first option on the list (Mysql 5.5 command Line Client.lnk), the following two error messages are shown:

  1. Path Not Found
  2. There is no Windows Program configured to run this type of file.

The other 3 options are of no help too.

Please help by explaining to me how can I use Mysql Command Line Client (the CUI for Mysql) in my Ubuntu version?

share|improve this question
Welcome to Ask Ubuntu! What CUI do you mean exactly? Is it the mysql command from the command line? – gertvdijk Jan 16 '13 at 12:20
up vote 7 down vote accepted

Open a terminal, e.g. by pressing Ctrl+Alt+T. Then run the command


Edit: Like mentioned in a comment, you can specify a user using the -u argument. If this user is password protected, also add a -p, then you'll be prompted for a password. For example if you wanted to log in with a user called root:

mysql -u root -p
share|improve this answer
This error is shown: "ERROR 1045 (28000): Access denied for user 'home'@'localhost' (using password: NO)" – Ananda Jan 16 '13 at 12:29
Actually it is saying it does NOT have a password so "mysql -uroot -p" should work. If not then force it, something like this: – Luis Alvarado Jan 16 '13 at 15:38
@LuisAlvarado No it's not. It says it's attempting to authenticate without any password and user 'home'@'localhost'. It's probably the wrong user as well as it's using the local shell username by default. By default a MySQL installation on Ubuntu has a root@localhost (used as just root to log in from localhost) and a password provided at installation time (= the administrative password asked by debconf). – gertvdijk Jan 16 '13 at 18:17
yes correct, read it wrong. – Luis Alvarado Jan 16 '13 at 20:19
Thanks a lot .. Its working now :) – Ananda Jan 21 '13 at 12:30

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.