How to dump only the MySQL database structure? I am trying to take dump of MySQL database structure using the following commands:

mysqldump -d -h localhost -u root -p databasename &gt; dumpfile.sql
mysqldump -d -h localhost -u root -p database databasename &gt; dumpfile.sql
mysqldump -d -h localhost -u root -P 3306 -p databasename &gt; c:\dumpfile.sql


What is wrong with them? Where should I get this file?
if you are using MySQLdump and specify  location will be inside the directory you specified for example:

mysqldump  -u root -d  -P port -p password databasename &gt; c:\dumpfile.sql


the dump location will be inside your machine under C drive

but if you did not specify  the directory the dump location will by inside MySQL\bin

mysqldump -u root -d -P port -p password databasename &gt; dumpfile.sql