Bug #36476 Bin log file changed ownership after password reset
Submitted: 2 May 2008 15:17 Modified: 20 May 2008 15:17
Reporter: Daniel Jewell Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S2 (Serious)
Version:5.0.37-log / i686 OS:Linux (Slackware ~11)
Assigned to: Paul Dubois CPU Architecture:Any
Tags: binary log, password, password reset, root
Triage: D4 (Minor)

[2 May 2008 15:17] Daniel Jewell
Description:
I reset the root password on this server after using the "skip grant tables and run as root" procedure at: http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html

After doing so, the server would not start via /etc/rc.d/rc.mysqld - I tried running regular mysqld_safe and mysqld ... Examined the error logs and noticed that it was denied access to the bin log in <mysql>/data. Either MySQL or the system changed ownership and group on the file to root from mysql.

Problem fixed by chown and chgrp on the latest binlog file back to mysql.

How to repeat:
Change root password according to 2nd procedure available at: http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html

Suggested fix:
Either amend documentation to include these notes 

OR

If MySQL modified permissions, perhaps add an option to disable modifying permissions on log files for password resets. (./mysqld --skip-grant-tables --user=root --no-log-modify --- Or something to that effect.)
[2 May 2008 17:47] Sveta Smirnova
Thank you for the report.

Verified as documentation bug.

2 things are not clear for me:

1. Why is needed to start mysqld with --user=root option
2. If this is needed is better to add remark about after starting mysqld with --user=root option all log files would have root ownership which can lead to problems as reporter described.
[15 May 2008 4:15] Paul Dubois
There is no need to start the server as root. The instructions conflate starting the server using the root login account with connecting to the server as a MySQL root user.

Will fix this by updating the instructions, and deal with Bug#36730 at the same time.
[20 May 2008 15:17] Paul Dubois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.