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

Installed MySQL - but not able to login with the user I created. It gives me the following error.

Access denied for user 'xxxxxx'@'localhost' (using password: YES)

Please help.

share|improve this question
Can you still login to MySQL with root? – squarebear Jan 5 '13 at 16:01
How did you create the user? Is this user listed when you log in as root? Is this MySQL from regular Ubuntu packages? – gertvdijk Jan 5 '13 at 18:14
up vote 0 down vote accepted

Simple solution is to login into mysql as a root user and grant privileges to other usernames.

mysql -u root -p

use the password, which you entered during the installation process.

grant all privileges on *.* to xxxxxxx@localhost identified by 'your_password_here' with grant option;

once this is done. You can login with your username using the command mysql -p

share|improve this answer

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.