Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] mysql: ERROR 1045 (28000): Access denied
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
angry_arctic_avian
n00b
n00b


Joined: 24 Oct 2009
Posts: 59

PostPosted: Tue Nov 05, 2013 4:58 am    Post subject: [SOLVED] mysql: ERROR 1045 (28000): Access denied Reply with quote

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
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1406

PostPosted: Tue Nov 05, 2013 3:38 pm    Post subject: Reply with quote

Stack Overflow
_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
angry_arctic_avian
n00b
n00b


Joined: 24 Oct 2009
Posts: 59

PostPosted: Wed Nov 06, 2013 6:35 am    Post subject: Reply with quote

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
View user's profile Send private message
angry_arctic_avian
n00b
n00b


Joined: 24 Oct 2009
Posts: 59

PostPosted: Wed Nov 06, 2013 7:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum