MySQL error log full of [Warning] Access denied for user ''@'localhost' (using password: NO)

stormy

Well-Known Member
Nov 22, 2003
142
12
168
Spain
cPanel Access Level
Root Administrator
I'm trying to fine-tune MySQL and troubleshoot a few issues, so I enabled log-warnings=2. I see that the MySQL error log is full of these:

[Warning] Access denied for user ''@'localhost' (using password: NO)

I suppose it's a user with a misconfigured site/connection. Is there any way to track the source of this?
 

SysSachin

Well-Known Member
Aug 23, 2015
604
48
28
India
cPanel Access Level
Root Administrator
Twitter
You will have to find out all sites MySQL details from site configuration files. Could you please let me know how many sites you have hosted on your server? You can find out all sites databases details through command line using grep or any other command.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello,

The following thread discusses a solution that would help if you want to log this activity in the future:

Access Logs for MySQL

However, note that it's not enabled by default so you won't be able to go back and review past connections.

Thank you.
 

rpvw

Well-Known Member
Jul 18, 2013
1,101
457
113
UK
cPanel Access Level
Root Administrator
Could these connections from an unspecified user be from the service manager checking to see if MySQL is alive ?