0

When I try to connect to MySQL on GGTS I get the following error thrown:

java.lang.IllegalArgumentException: Bad artifact coordinates mysql-connector-java-5.1.36-bin, expected format is :[:[:]]:

I am running GGTS on Ubuntu on a VM.

I have read that there was a problem with Windows. Could that be similar with Ubuntu?

4

1 回答 1

1

您没有在grails-app/conf/application.groovy.

它应该是这样的:

dataSource {
    dbCreate = "update"
    url = "jdbc:mysql://localhost:3306/my_database"
    driverClassName = "com.mysql.jdbc.Driver"
    dialect = org.hibernate.dialect.MySQL5InnoDBDialect
    username = "username"
    password = "password"
}

请记住,如果您有针对当前执行环境(例如生产环境)的特定配置,则必须编辑相关配置:

environments {
    production {
        dataSource {
            url = "jdbc:mysql://liveip.com/liveDb"
            // other environment-specific settings here
        }
    }
}

如需完整参考,请参阅grails 数据源文档

于 2015-08-21T20:28:31.673 回答