![]() ![]() ![]() ![]() "%mysqldir%\bin\mysqldump" -user=?user% -password=?pass% -databases %%f > "%bkupdir%\%fn%_%%f.sql" This one here works but only fails for some with the LOCK TABLES privilege error. "%mysqldir%\bin\mysqldump" -user=?user% -password=?pass% -databases %%f -result-file="%bkupdir%\%fn%_%%f.sql" -single-transaction -quick This one here fails completely creating 0 byte files. Now, when I put that into a loop in a batch, I does not work anymore and my files are all empty. C:> "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqldump" -user=backup -password=backup -databases apps_xyz -result-file="D:\mysql\backup\-14-56_apps_xyz.sql" -single-transaction I have read that dumping with -single-transaction would get rid of the necessity to lock tables and I tried that and it worked. There are, however, also DBs which are all InnoDB and get dumped correctly. The whole backup for this DB in then empty. The script does not work for some databases failing with an error stating the user executing the dump does not have LOCK TABLES (error 1045) privileges for a single table, which he has. So this line should be: 'C:\Program Files\MySQL\MySQL Server 4. Missing a slash between bin and mysqldump. Must use double-quotes around 'pass', single-quotes don't seem to work when I try it. I have a batch looping over all databases in the data dir and creating a backup for each database one by one. Must enclose the path to the mysqldump program in double-quotes to ensure it's treated as one argument. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |