a

    aaronfox

    5 years ago
    Still having the same issue from before; if anyone has a project that works with MySQL and is using maven, I'd love to get a look at where you connect/your pom.
    w

    wouterdoeland

    5 years ago
    What's not working?
    // connect to the database
        Database.connect("jdbc:<mysql://localhost/database?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&nullNamePatternMatchesAll=true>", driver = "com.mysql.cj.jdbc.Driver", user = "usert", password = "password")
    Is what I use to connect. This is my gradle:
    repositories {
        jcenter()
        maven { url "<https://kotlin.bintray.com/exposed>" }
    }
    
    dependencies {
        compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
    
        // exposed
        compile 'org.jetbrains.exposed:exposed:0.8.5'
    
        // <https://mvnrepository.com/artifact/mysql/mysql-connector-java>
        compile group: 'mysql', name: 'mysql-connector-java', version: '6.0.6'
    }