I am running mysql on a Windows 2003 server,
If I type this command into a cmd line, it works fine, and dumps a copy of my moodle database.

D:\mysql\bin\mysqldump.exe -u root -p mypassword moodle > D:\backup\testDump.sql

If I put the command in a batch file, and run it, I get this error.

mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect


Any suggestions welcome, thank you

Steve Audus
Chaucer BEC
Sheffield UK