Question

MySQL ErrorLog - [Note] Access denied for user 'root'@'localhost' (using password: YES)

Posted January 24, 2019 3.9k views
MySQL Ubuntu 16.04

Hi! I have a problem with mySQL. Checking the error log, i saw a list of [Note] Access denied for user ‘root’@'localhost’ (using password: YES) errors for every day.

Can someone tell me why that’s happened? How can i know who or what is trying to acceed with root?

(I’m so sorry for my bad english :P )

Thx,
Nicholas

1 comment
  • I am having the same exact issue (ERROR 1045 (28000): Access denied for user ‘forge’@'localhost’ (using password: YES)). End of the work day yesterday, everything was working accordingly.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

2 answers

My english is very bad, but in you console you can create a new user with all privileges. May be your password is wrong:

  • mysql -u root -p -h localhost CREATE USER ‘myNewUser’@'localhost’ IDENTIFIED BY 'myNewPassword’; *GRANT ALL PRIVILEGES ON *. TO 'myNewUser’@’%’; *FLUSH PRIVILEGES;

Now you can enter whit the user myNewUser.

  • I will try this solution this night. If all goes well i will set the answer as accepted.
    Just a few questions…
    Can this method have security issues?
    Why I need to set it, if I can log-in into phpMyAdmin with an other user?

    • You are giving privileges from any I.P. Maybe changing “TO ‘myNewUser’@’%’; ”
      for “TO 'myNewUser’@'my.specific.ip’;” is better.

      Like this:

      GRANT ALL PRIVILEGES ON . TO 'USERNAME’@'1.2.3.4’ IDENTIFIED BY 'PASSWORD’ WITH GRANT OPTION;

Hello, I installed mysql and joomla while installation i crated a db joomla now when i am going to make configuration from localhost/joomla showing error :
Error
Could not connect to the database. Connector returned number: Could not connect to MySQL server.

from my local when i am going to connect to mysql then showing error,
ERROR 1045 (28000): Access denied for user ‘pytondev’@'localhost’ (using password: NO)

PLEASE HELP ME OUT FOR THIS.

Submit an Answer