root@biki:/home/welcome# mysql -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) .

1 Answer 1


Use the

mysql --user=user_name --password{=password} db_name


mysql -u user_name -p{password} db_name

using the mysql admin username and password, or the appropriate db_name's username/password, or your_own_username/password.

If you wish to login using the root username, you may have to add that info to the mysql authorized list of users... but of course... you're not normally logged into the root account... correct?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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