MySQL – How to Run mysqldump from Windows Command Prompt

command lineMySQLmysql-5.1mysqldump

I'm using non-install version of mysql5.1 on Windows.
I have placed "mysql" folder under c:\ and it seems to work fine.

But when I try C:\>mysql\bin\mysqldump.exe -u root -p mydatabase > c:\>mydatabase.sql from command prompt it doesn't work and gives back only Access Denied.
(It doesn't even ask to enter the password.)

How can I use mysqldump from windows command prompt?

Best Answer

it permissions conflict when try create file -

c:>mydatabase.sql

create new folder c:\backup, change string to

C:\>mysql\bin\mysqldump.exe -u root -p mydatabase > c:\backup\mydatabase.sql

I think it just mistake when type there -

c:\>mydatabase.sql

it is also not correct, correct:

c:\mydatabase.sql

correct, but still will return error, right way - create folder