Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

marked as duplicate by Scott Pack, Ben Pilbrow, Iain, coredump, voretaq7 Apr 4 '11 at 5:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

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
share|improve this answer
    
yeah..this works! –  Arihant Apr 3 '11 at 14:25
    
i found one more solution : linuxquestions.org/questions/linux-software-2/… This is also working fine. –  Arihant Apr 3 '11 at 14:26

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