configure grails to create the database if it doesn't exist.
问题 I have the following settings on a new grails project: dataSource { pooled = true driverClassName = "com.mysql.jdbc.Driver" dialect = "org.hibernate.dialect.MySQL5InnoDBDialect" username = "sa" password = "" } environments { development { dataSource { dbCreate = "create-drop" // one of 'create', 'create-drop', 'update', 'validate', '' url = "jdbc:mysql://localhost/myapp?useUnicode=yes&zeroDateTimeBehavior=convertToNull&characterEncoding=UTF-8" username = "root" password = "" } } } when I run