1

New to MySQL and just learning how to setup a daily full backup (binary logs enabled). My goal is to run a daily full backup of the databases/schemas and reset the binary log.

I'm currently using an edited script that creates individual backup files for each schema which is great.

Each run through the loop executes this against a database and all looks great except the binary log does not reset.:

%mysqldumpexe% --user=%dbuser% --password=%dbpass% --routines --master-data=2 --databases %%F --log-error=%errorLogPath% > "E:\MySQLBackup\Database\%%F.%backuptime%.sql"

When I add the --flush-logs parameter to the line and run it, it:
1) Creates separate binary logs for each database (currently I have only one)
2) Creates full backup files that are 1-2kb with no data?!

What am I doing wrong here? I want the full backup to be a complete dump of the database at the time and also reset the binary log so it contains the changes just after the full backup.

Thanks in advance

1 Answer 1

1

This is related to a bug with new installs of mysql on debian wheezy whereby the error.log file is owned by root.root, as per this: http://tipstricks.itmatrix.eu/?p=1352

I fixed it with chown mysql.adm /var/log/mysql/error.log

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.