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