Solved

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

Posted on 2008-06-13
4
618 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mysql between clause 2 41
FrontEnd tools to create web database application 7 93
how to access a remote mysql database with xampp 3 43
MySQL 5.6.30 - daily outages 46 67
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

730 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