Reverse engineer.
After:
Code:
persistence setup --database MYSQL --provider HIBERNATE --userName XXX --password XXX
(Or editing the database.properties instead of passing the database user and password)
Try:
Code:
database reverse engineer --schema PUBLIC --package ~.domain
Using the appropriate schema and the desired package.
If it fails, because Roo needs the driver to connect to the database, Roo will locate an addon for doing so. Just follow the instructions, basically you'll have to do something like this:
Code:
addon install id --searchResult 01
Being 01 the first addon that Roo has found.
Note: Roo doesn't create any ddl, Roo generates JPA code and therefore the database can be created, validated and so on.
Find the next line within the persistence.xml:
Code:
<property name="hibernate.hbm2ddl.auto" value="validate"/>
If you already have the entities, you can set value to create and the JPA engine (Hibernate, for instance) will create the tables.
To achieve database definition, the JPA annotations are used (@Entity, @ManyToOne, @JoinColumn...), but I don't know if you can create all the database stuff (indexes, for instance) with JPA. If it's not possible (try the documentation) you will have to modify the database using its own commands (MySQL in your case)