Grails with MySQL (Local Database)

 

Just Edit the application.yml as

You can view the files direct from here, or you can edit your setting as given below :
dataSource:  
  pooled: true
    jmxExport: true
    driverClassName: com.mysql.jdbc.Driver
    dialect: org.hibernate.dialect.MySQL5InnoDBDialect
    username: root
    password: 12345

environments: 
  development: 
    dataSource: 
      dbCreate: create-drop
      url: jdbc:mysql://localhost/auth 
  test: 
    dataSource: 
      dbCreate: update     
      url: jdbc:mysql://localhost/auth 
  production: 
    dataSource: 
      dbCreate: none 
      url: jdbc:mysql://localhost/auth
 

Then Edit build.gradle

dependencies{
runtime 'mysql:mysql-connector-java:5.1.36'
}

Powered by Blogger.