Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 624
  • Last Modified:

How do I create a DDL Script to capture the schema of an existing Database

Im new to MySQL and Im trying to get my bearing on the basic tools.

Trying to generate a DDL to import into the workbench (don't know why the workbench cant just connect to a database and generater one itself...seems like a fairly obvious usage)

Be that as it may I cant seem to figure out how to accomplish this or at least there doesnt seem to be a basic gui option to generate it so I assum I probably have to run some kind of command...

What would the correct command be..or am I wrong and is there an easy way in the basic tool sets to generate this DDL script.

I am using the 5.0 my sql tools
0
Prysson
Asked:
Prysson
  • 2
  • 2
1 Solution
 
Tomas Helgi JohannssonCommented:
      Hi!

Use mysqldump with the option --no-data see following
http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html
That produces the DDL of your database.

Regards,
   Tomas Helgi
0
 
PryssonAuthor Commented:
Much Thanks
0
 
PryssonAuthor Commented:
One question...I am doing this on a windows box..my assumption was that I should be able to just do this in the query browser...but I get syntax errors...

This is my statement

mysqldump --no-data vinwin_base

is there some part I am missing?
0
 
Tomas Helgi JohannssonCommented:
This is one of many  command line tools provided with mysql.

Regards,
   Tomas Helgi
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now