1

This may be a noob question.

But I have tried everything, purging and reinstalling trying to reconfigure and the works.

For some reason my root that was set without a password on localhost is denying me access

I have tried to reset the root password using the command line but to no avail.

Does anybody know how to get this error to be fixed?

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

I am using linux and ubuntu

1 Answers1

0

Even though you set your root user to login without a password, this does not mean that user devin has been configured to login without a password.

Edit your .my.cnf file:

vi ~/.my.cnf

In the file which you see, hard code the password for user devin, save the file, then exit.

[client]
user=devin
password=your_password_goes_here

Then restart MySQL and devin should be able to login without using a password.

The following command should work to connect you to a database called my_db:

mysql --user=devin my_db
Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360
  • Perhaps I have done it wrong, but I still get an error after this ERROR 1045 (28000): Access denied for user 'devin'@'localhost' (using password: YES) The only difference now is that it says using password: YES –  Jan 19 '16 at 07:50
  • Are you sure you have the right password? Can you connect from the command line? – Tim Biegeleisen Jan 19 '16 at 07:52
  • This is the error from the command line, It is wierd that it does not connect –  Jan 19 '16 at 07:52
  • It isn't weird if you are using the wrong password. Are you _certain_ that the credentials are correct? Have you ever been able to login? – Tim Biegeleisen Jan 19 '16 at 07:53
  • Yes, I did a fresh install just before posting to make sure they were right, I have also tried a number of my most common passwords –  Jan 19 '16 at 07:55
  • There could many reasons why you cannot login in, you will have to debug this yourself. [Here](http://stackoverflow.com/questions/1412339/cannot-log-in-with-created-user-in-mysql) is one article which might help you. – Tim Biegeleisen Jan 19 '16 at 07:59