title: Create database with JPA?
body: <p>When I create (using JPA - java persistence api) a persistence unit and then persistence entities they auto create the corresponding tables and fields in the database.</p>
  
  <p><strong>Can I also make it to auto create the database (if it doesn't exist)?</strong></p>
  
  <p>My objectif is : </p>
  
  <p>I mean it creates inside the database the tables and fields, but not the database, and if the database hasn't been created before (by hand) - everything fails. So before running the project (which will auto generate the tables and fields if needed) I first must create (by hand) a database. </p>
  
  <p>I use : Eclipse (Java, Hibernate, Flex/Air), MySQL</p>
  
  <p>Thanks for all information</p>