1

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?

evfwcqcg
  • 113
  • 4

1 Answers1

4

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.

leepfrog
  • 488
  • 2
  • 9
  • 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 00:02