Skip to content

Commit

Permalink
Replace mysql-connector with mariadb-client
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhanunlu committed May 27, 2024
1 parent bce37d7 commit 7a58658
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,12 @@ object Rdbms {
database: String
) extends Rdbms {

val driver: Class[_] = Class.forName("com.mysql.cj.jdbc.Driver") // Load class
val driver: Class[_] = Class.forName("org.mariadb.jdbc.Driver") // Load class

val sslModeParam: String = if (sslMode) "&sslMode=trust" else "&sslMode=disable&allowPublicKeyRetrieval=true"

val connectionString =
s"jdbc:mysql://$host:$port/$database?user=$username&password=$password" ++ (if (sslMode)
"&sslMode=REQUIRED"
else
"&sslMode=PREFERRED")
s"jdbc:mysql://$host:$port/$database?permitMysqlScheme&user=$username&password=$password$sslModeParam"
}

val postgresqlDbDecoder: Decoder[PostgresqlDb] =
Expand Down
6 changes: 3 additions & 3 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ object Dependencies {
val uaParser = "1.5.4"
val snakeYaml = "2.2"
val postgresDriver = "42.7.2"
val mysqlConnector = "8.3.0"
val mysqlClient = "3.4.0"
val hikariCP = "5.0.1"
val jaywayJsonpath = "2.7.0"
val jsonsmart = "2.4.10"
Expand Down Expand Up @@ -114,7 +114,7 @@ object Dependencies {
val snakeYaml = "org.yaml" % "snakeyaml" % V.snakeYaml
val uaParser = "com.github.ua-parser" % "uap-java" % V.uaParser
val postgresDriver = "org.postgresql" % "postgresql" % V.postgresDriver
val mysqlConnector = "com.mysql" % "mysql-connector-j" % V.mysqlConnector
val mysqlClient = "org.mariadb.jdbc" % "mariadb-java-client" % V.mysqlClient
val hikariCP = ("com.zaxxer" % "HikariCP" % V.hikariCP)
.exclude("org.slf4j", "slf4j-api")
val jaywayJsonpath = "com.jayway.jsonpath" % "json-path" % V.jaywayJsonpath
Expand Down Expand Up @@ -219,7 +219,7 @@ object Dependencies {
uaParser,
snakeYaml,
postgresDriver,
mysqlConnector,
mysqlClient,
hikariCP,
jaywayJsonpath,
jsonsmart,
Expand Down

0 comments on commit 7a58658

Please sign in to comment.