472,103 Members | 1,096 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,103 software developers and data experts.

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

usafshah
104 100+
Hi


I'm using linux with mysql , when i type mysql in terminal it says like:

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

i'm logged in as root

but it works when i type mysql -u root -p and then type root password.
Feb 21 '07 #1
1 24066
Motoma
3,237 Expert 2GB
Hi


I'm using linux with mysql , when i type mysql in terminal it says like:

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

i'm logged in as root

but it works when i type mysql -u root -p and then type root password.
There is a reason for this:
Typing mysql logs into your MySQL server using your username with no password. If your user account (i.e. the mysql account that has the same name as your linux user account) is password locked, then you will need to specify the -p command line argument so that you may enter your password.

You see, MySQL user accounts are not the same as Linux user accounts; there isn't usually a 1:1 mapping between them, and they can have different passwords.
Feb 21 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Morten Gulbrandsen | last post: by
reply views Thread by Morten Gulbrandsen | last post: by
2 posts views Thread by arsisthesis | last post: by
3 posts views Thread by Greg Noss | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.