View previous topic :: View next topic |
Author |
Message |
angry_arctic_avian n00b
Joined: 24 Oct 2009 Posts: 59
|
Posted: Tue Nov 05, 2013 4:58 am Post subject: [SOLVED] mysql: ERROR 1045 (28000): Access denied |
|
|
This is my first time working with mysql. I have got the server running, and I can login as root, after I change the default password. Though I have created a user, granted and flushed privileges to this user, I still get the error:
Code: |
ERROR 1045 (28000): Access denied for user 'user'@'localhost' (using password: YES)
|
whenever I try to connect directly to the server, or through some test php code.
Here is the output for SHOW GRANTS FOR user:
Code: |
GRANT USAGE ON *.* TO 'user'@'localhost' IDENTIFIED BY PASSWORD '***********************'
GRANT ALL PRIVILEGES ON `mydb`.* TO 'user'@'localhost'
|
I have tried just about everything I could find when I did a google search on the above error without any success. I appreciate it in advice for any advice I receive.
Last edited by angry_arctic_avian on Wed Nov 06, 2013 7:49 pm; edited 1 time in total |
|
Back to top |
|
|
eyoung100 Veteran
Joined: 23 Jan 2004 Posts: 1428
|
|
Back to top |
|
|
angry_arctic_avian n00b
Joined: 24 Oct 2009 Posts: 59
|
Posted: Wed Nov 06, 2013 6:35 am Post subject: |
|
|
Thanks for the response, eyoung100. However, one of the things I found before making this post, was the mysql_secure_installation command. It is suppose to (and has from what I can see) remove the anonymous user accounts, and the test database from mysql. |
|
Back to top |
|
|
angry_arctic_avian n00b
Joined: 24 Oct 2009 Posts: 59
|
Posted: Wed Nov 06, 2013 7:48 pm Post subject: |
|
|
After removing the previous mysql database and re-running emerge --config dev-db/mysql, I came across a line telling me to avoid certain symbols for my passwords. Sure enough, it contained a symbol that was part of my previous non-root user's password. After running mysql_secure_installation to get rid of the anonymous users and test database, I re-created the same user with a different password. I am now able to login to mysql server as this user. |
|
Back to top |
|
|
|