0

Possible Duplicate:
How should I diagnose ERROR 1045 during MySQL installation?

The server runs on Ubuntu 9.10 64b.

I have installed mysql-server from source. The installation has completed successfully but when I run the mysql command in a terminal, I get following error:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

What does that mean ? How do i rectify this error?

Arihant
  • 191
  • 1
  • 2
  • 6

1 Answers1

5

You need to set a password before you can use it:

mysqladmin -u root password mysecret

After that, you can login with

mysql -u root -p
Bart De Vos
  • 17,911
  • 6
  • 63
  • 82
  • yeah..this works! – Arihant Apr 03 '11 at 14:25
  • i found one more solution : http://www.linuxquestions.org/questions/linux-software-2/error-1045-28000-access-denied-for-user-root@localhost-using-password-no-459578/ This is also working fine. – Arihant Apr 03 '11 at 14:26