Bug 58035 - mysql-server: logrotate script mysqld fails due to missing password
Summary: mysql-server: logrotate script mysqld fails due to missing password
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mysql
Version: 7.2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Patrick Macdonald
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-01-06 18:21 UTC by Hans Ecke
Modified: 2007-04-18 16:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-01-14 17:34:36 UTC
Embargoed:


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

Description Hans Ecke 2002-01-06 18:21:45 UTC
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 18:22:27 UTC
Created attachment 41895 [details]
dump of user and host tables in the mysql database

Comment 2 Trond Eivind Glomsrxd 2002-01-14 17:34:30 UTC
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 19:49:13 UTC
Fixed in 3.23.47-4


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