cgimickalo

Well-Known Member
Apr 19, 2013
78
0
6
N.W. Iowa
cPanel Access Level
Root Administrator
I notice I just started getting these notices after the last Cpanel Stable update 11.40.01-9 when the daily cron runs:
Code:
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
error: error running non-shared postrotate script for /var/lib/mysql/mysql_slowquery.log of '/var/lib/mysql/mysql_slowquery.log '
I don't have any problems connecting at the command line w/mysqladmin and the root my.cnf file is configured properly too. Any suggestion would be appreciated as how to fix this.

Thanks,
 

cPanelPeter

Technical Analyst III
Staff member
Sep 23, 2013
575
21
143
cPanel Access Level
Root Administrator
Twitter
Hello,

You mentioned it was coming from the daily cron? I would check that first.
You may have some plugin installed that is calling mysqladmin directly.

# ls -al /etc/cron.daily
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
no plug-ins installed that I know of. The cron.daily folder has been the same for some time this just started in the last couple of days.

Mike
What specific cron jobs are you running in the /etc/cron.daily directory? Could you provide us with a list?

Thank you.
 

cgimickalo

Well-Known Member
Apr 19, 2013
78
0
6
N.W. Iowa
cPanel Access Level
Root Administrator
these are the files in the /etc/cron.daily folder:
Code:
logrotate*
makewhatis.cron*
mlocate.cron*
prelink*
readahead.cron*
tmpwatch*
one thing I did notice was the script modsecparse.pl was also in that folder, which it has been for some time and never caused any issues, I removed it and put it back in the /etc/cron.hourly folder. I believe the EasyApache puts it in there when it's run added Mod Security for Apache.

Mike
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
The error is likely coming from the logrotate cron job based on the error message that you provided. Here is the content of that cron job on a test machine that I setup:

Code:
#!/bin/sh
export TMPDIR=/var/spool/logrotate/tmp

/usr/sbin/logrotate /etc/logrotate.conf >/dev/null 2>&1
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
    /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0
You may want to review the same file on your system to see if any additional entries are used to connect to MySQL and rotate the MySQL slow query log.

Thank you.
 

cgimickalo

Well-Known Member
Apr 19, 2013
78
0
6
N.W. Iowa
cPanel Access Level
Root Administrator
That was one of the first things I checked before posting, for multiple instances rotating that log file, none was found but I will check again. I don't think that's the problem though.

That is the same logrotate cron file I have in the /etc/cron.daily folder

Mike
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

Thank you.