Posted on 2005-04-24
I am trying to create a batch file, which will dump the contents of a database into a file. I am using MySQL 4.1 on Windows. The script in the batch file, backup.bat, looks like this:
C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqldump -u root --password=password --opt database_name > /apps/backup.sql
When I run this batch file, a DOS window appears very quickly and disappears and the backup.sql file is created, but with nothing in it. The DOS window appears too quickly to be able to read any error messages. Is there a way of viewing the error?
I have tried running the above script directly from a DOS window. I get the following error message:
mysqldump: Got error: 1146: Table 'database_name.;' doesn't exist when doing LOCK TABLES
Any help would be very much appreciated.