Bug 792332

Summary: msqldump --flush-log & mysqladmin flush-log fail
Product: [openSUSE] openSUSE 12.2 Reporter: Curtis J Blank <Curt.Blank>
Component: BasesystemAssignee: Michal Hrusecky <mhrusecky>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P1 - Urgent CC: archie.cobbs, carlos.e.r, Curt.Blank
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 12.2   
Whiteboard: maint:running:54320:important maint:released:sle11-sp3:54511
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Curtis J Blank 2012-12-02 18:43:07 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0

msqldump --flush-log & mysqladmin flush-log fail

When mysqldump fails the dump i.e. backup of the DB fails, that is unacceptable

Reproducible: Always

Steps to Reproduce:
1.issue msqldump --flush-log or mysqladmin flush
2.
3.
Actual Results:  
issue msqldump --flush-log or mysqladmin flush fail and if using mysqldump to do a backup of the DB no backup is created which is unacceptable.

Expected Results:  
I expect the logs to be flushed when using the flush-log option and I expect mysqldump to complete successfully.

The problem appears to be in the supplied /etc/my.cnf file.

err-log needs to be defined in the [safe_mysqld] section, i.e.

[safe_mysqld]
log-error       = /var/log/mysql/mysqld.log
err-log         = /var/log/mysql/mysqld.err
socket          = /var/run/mysql/mysql.sock

Pretty bad oversight IMO
Comment 1 Curtis J Blank 2012-12-02 18:51:08 UTC
Might also be the cause of Bug 763150.
Comment 2 Curtis J Blank 2012-12-15 19:45:24 UTC
This problem has surfaced again, msqldump --flush-log or mysqladmin flush-logs is throwing the err

# mysqladmin flush-logs
mysqladmin: refresh failed; error: 'Unknown error'
Comment 3 Curtis J Blank 2012-12-15 20:01:31 UTC
Ok, I think I found the fix the /var/log/mysql directory also needs to be owned by mysql not just the log files in it.

drwxrwx--- 2 mysql mysql 4096 Dec 15 00:00 /var/log/mysql

It works again after I chown the directory to mysql:mysql from root:root
Comment 4 Archie Cobbs 2013-05-13 13:37:28 UTC
See also https://bugzilla.novell.com/show_bug.cgi?id=763150

May have the same underlying cause.
Comment 5 Michal Hrusecky 2013-07-26 11:20:00 UTC
*** Bug 763150 has been marked as a duplicate of this bug. ***
Comment 6 Michal Hrusecky 2013-07-26 11:20:14 UTC
*** Bug 789263 has been marked as a duplicate of this bug. ***
Comment 7 Michal Hrusecky 2013-07-29 07:39:08 UTC
Fixed for the Factory, will get into stable releases with next update.
Comment 9 Swamp Workflow Management 2013-10-07 16:55:27 UTC
Update released for: libmysql55client18, libmysql55client18-32bit, libmysql55client18-x86, libmysql55client_r18, libmysql55client_r18-32bit, libmysql55client_r18-x86, libmysqlclient-devel, libmysqlclient15, libmysqlclient15-32bit, libmysqlclient15-x86, libmysqlclient_r15, libmysqlclient_r15-32bit, libmysqlclient_r15-x86, mysql, mysql-Max, mysql-bench, mysql-client, mysql-debug, mysql-debug-version, mysql-debuginfo, mysql-debugsource, mysql-test, mysql-tools
Products:
SLE-DEBUGINFO 11-SP3 (i386, ia64, ppc64, s390x, x86_64)
SLE-DESKTOP 11-SP3 (i386, x86_64)
SLE-SDK 11-SP3 (ia64, ppc64, s390x, x86_64)
SLE-SERVER 11-SP3 (i386, ia64, ppc64, s390x, x86_64)
SLES4VMWARE 11-SP3 (i386, x86_64)