views:

158

answers:

3

I am looking for a piece of software to allow me easily create the database mode for an existing MySQL database

+2  A: 

If you use mysqldump with the --no-data option, you can extract the schema from the old database. There can be issues with views using this method, see this article for a workaround.

You can copy a schema in this way with something like this:

mysqldump --opt --no-data olddatabase | mysql newdatabase
Paul Dixon
+2  A: 

You can dump the database schema to SQL using the mysqldump command.

mysqldump {databasename} --no-data=true -u {username} -p  > database_schema.sql
Matt
+1  A: 

http://dev.mysql.com/workbench/ is still in Beta (depending on your Operating System), but can be a handy tool for exploring the schema of databases - there is a free version to.

Use mysqldump on your DB as the other answers state then import the resulting file into this program.

James