Solved

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

Posted on 2008-06-13
4
616 Views
Last Modified: 2012-05-05
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
Comment
Question by:Prysson
  • 2
  • 2
4 Comments
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 500 total points
ID: 21778334
      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
 

Author Closing Comment

by:Prysson
ID: 31466910
Much Thanks
0
 

Author Comment

by:Prysson
ID: 21778764
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
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 21779120
This is one of many  command line tools provided with mysql.

Regards,
   Tomas Helgi
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Format data and display in formatted manner 3 56
Mysqli Query 5 48
Sql query on a varchar that is numeric. 8 27
updating the date data 12 25
A lot of articles have been written on splitting mysqldump and grabbing the required tables. A long while back, when Shlomi (http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump) had suggested a “sed” way, I actually shell …
All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now