Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a connection to remote Mysql database. (i'm using MySQL Workbench). I'd like to copy whole structure of the database, (without data) to create identical structure on my local machine. Is it possible if I have only username and password to access that database?

share|improve this question
up vote 4 down vote accepted

mysqldump -h <host/ip> -d -u <user> -p<password> <database> > export.sql

Note that there is no space between -p and the first character of the password.

share|improve this answer
Thanks. Btw, this command downloads all data so I added -d prefix to download only its schema. – evfwcqcg May 15 '12 at 17:35
Sorry, I forgot to add that. I've edited it in to my answer to make it more clear for others who search for this. – leepfrog May 16 '12 at 0:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.