MySQL will create your schema within a database, but will not create your actual database for you. You must have an existing database called 'userdb' in your local MySQL installation (log in and run something like 'create database userdb') before you run the schema export in hibernate.