Finally I realised what's wrong here. Your parameter -p
followed by blank space implies that you will type a password by the prompt "Enter password:", and your [password] is interpreted as a database name. Since there is no database named like your password, everything is dumped. From documentation:
--password[=password], -p[password]
The password to use when connecting to the server. If you use the
short option form (-p), you cannot have a space between the option and the
password. If you omit the password value following
the --password or -p option on the command line, mysqldump prompts for one.
So, your command should be:
"C:\wamp\bin\mysql\mysql5.6.12\bin\mysqldump.exe" -u [user] -ppassword "my-db-name" > dump.sql
(notice that here is no blank space between -p
and your password),
or like this:
"C:\wamp\bin\mysql\mysql5.6.12\bin\mysqldump.exe" -u [user] -p "my-db-name" > dump.sql
(here you input password from keyboard after pressing Enter
).