# Schema from pre-existing database

**URL:** <https://forum.elixirforum.com/t/schema-from-pre-existing-database/3682>\
**Category:** Questions\
**Tags:** ecto\
**Created:** [February 14, 2017, 9:33am UTC](https://forum.elixirforum.com/t/schema-from-pre-existing-database/3682 "2017-02-14T09:33:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mandemus](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/m/a9adbd/32.png) [@Mandemus](https://forum.elixirforum.com/u/Mandemus)\
**Post date:** [February 14, 2017, 9:33am UTC](https://forum.elixirforum.com/t/schema-from-pre-existing-database/3682/1 "2017-02-14T09:33:30Z")

</div>

Are there mix tools to import a schema from a pre-existing database? OORM’s in Java such as JOOQ or DynSQL generally have generators for this. I would like to define my schema within NaviCat not a text editor.

The only tutorial I could find on the topic, well he did it by hand.

> **[Using Ecto With an Existing MySQL Database](https://geoffreylessel.com/2016/using-ecto-with-an-existing-mysql-database/)**
>
> There was some great feedback from people regarding my post on gettingEcto in your non-Phoenix application (From Zero to Ecto in 10 Minutes).One of the questions I got was about using Ecto with existing databases. Whileusing Ecto with a new database...

---

<div class="post-metadata">

**Author:** ![josevalim](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/32/1787_2.png) [@josevalim](https://forum.elixirforum.com/u/josevalim)\
**Post date:** [February 14, 2017, 10:46am UTC](https://forum.elixirforum.com/t/schema-from-pre-existing-database/3682/2 "2017-02-14T10:46:59Z")

</div>

There is a command in Ecto 2.0 called `mix ecto.load` and `mix ecto.dump` that allow you to load and dump a database schema.
