tags:

views:

27

answers:

2

Hi, I would like to extact my database(Mysql database) schema in the graphical format or xml format. could any one help me out in this process.. Pl. help me by providing step by step to extract the schema from mysql database, if possible. I am using Linux ubuntu machine.

thanxs

+1  A: 

You can use mysqldump utility to retrieve schema in XML

There are three general ways to invoke mysqldump:
shell> mysqldump [options] db_name [tables]
shell> mysqldump [options] --databases DB1 [DB2 DB3...]
shell> mysqldump [options] --all-databases --xml, -X Write dump output as well-formed XML.

--password[=password], -p[password] The password to use when connecting to the server. If you use the short option form (-p), you cannot have a space between the option and the password. If you omit the password value following the --password or -p option on the command line, you are prompted for one.
--user=user_name, -u user_name The MySQL username to use when connecting to the server.

Leonid
i have given mysqldump -u user_name -p --databases database_name --xml > /tmp/test.xml.. but it is giving syntex error.. what is the exact command if i want to extract the schema into test.xml file??
indie
A: 

This plugin for MySQL Workbench should help: http://www.diloc.de/blog/2009/10/14/mysql-workbench-propel-export-plugin-v05/

Piskvor