Bug 58035 - mysql-server: logrotate script mysqld fails due to missing password
mysql-server: logrotate script mysqld fails due to missing password
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: mysql (Show other bugs)
7.2
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Patrick Macdonald
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-01-06 13:21 EST by Hans Ecke
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-01-14 12:34:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
dump of user and host tables in the mysql database (2.37 KB, text/plain)
2002-01-06 13:22 EST, Hans Ecke
no flags Details

  None (edit)
Description Hans Ecke 2002-01-06 13:21:45 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011121

Description of problem:
In the logrotate script /etc/logrotate.d/mysqld, we call the command
'/usr/bin/mysqladmin flush-logs'. On my system, this leads to the
following error:

/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: NO)'

Of course the user root@localhost has a password on my machine.

If I run the flush-logs command with '-p' and interactively give the
password it works just fine.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. install and configure mysql-server, logrotate and cron
2. set mysql-root password
3. setup some database or other
4. wait for cron error message


Actual Results:  Cron calls logrotate which executes
/etc/logrotate.d/mysqld. This fails with the error message 

/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: NO)'

Cron notifies me about that in an e-mail

Expected Results:  The script should have executed successfully and silently

Additional info:

anacron-2.3-17
crontabs-1.10-1
logrotate-3.5.9-1
mysql-3.23.41-1
mysql-devel-3.23.41-1
mysql-server-3.23.41-1
mysqlclient9-3.23.22-6
vixie-cron-3.0.1-63

Please see attachment for a dump of the user and host tables.
Comment 1 Hans Ecke 2002-01-06 13:22:27 EST
Created attachment 41895 [details]
dump of user and host tables in the mysql database
Comment 2 Trond Eivind Glomsrxd 2002-01-14 12:34:30 EST
A problem is that killing it instead of using mysqladmin disturbs logs and
(reportedly) replication. I agree the current situation is far from ideal.
Comment 3 Trond Eivind Glomsrxd 2002-01-17 14:49:13 EST
Fixed in 3.23.47-4

Note You need to log in before you can comment on or make changes to this bug.