Upgrade to MySQL 8.0.
Switch to a newer MySQL version to use TLSv1.2 as newer JRE versions no longer support TLSv1/TLSv1.1. Closes #594.
This commit is contained in:
@@ -28,7 +28,6 @@ import org.springframework.data.r2dbc.testing.ExternalDatabase.ProvidedDatabase;
|
||||
|
||||
import org.testcontainers.containers.MySQLContainer;
|
||||
|
||||
import com.github.jasync.r2dbc.mysql.MysqlConnectionFactoryProvider;
|
||||
import com.mysql.cj.jdbc.MysqlDataSource;
|
||||
|
||||
/**
|
||||
@@ -98,7 +97,7 @@ public class MySqlTestSupport {
|
||||
.database("mysql") //
|
||||
.username("root") //
|
||||
.password("my-secret-pw") //
|
||||
.jdbcUrl("jdbc:mysql://localhost:3306/mysql") //
|
||||
.jdbcUrl("jdbc:mysql://localhost:3306/mysql?allowPublicKeyRetrieval=true") //
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -110,7 +109,7 @@ public class MySqlTestSupport {
|
||||
if (testContainerDatabase == null) {
|
||||
|
||||
try {
|
||||
MySQLContainer container = new MySQLContainer(MySQLContainer.IMAGE + ":" + MySQLContainer.DEFAULT_TAG);
|
||||
MySQLContainer container = new MySQLContainer("mysql:8.0.24");
|
||||
container.start();
|
||||
|
||||
testContainerDatabase = ProvidedDatabase.builder(container) //
|
||||
@@ -144,7 +143,7 @@ public class MySqlTestSupport {
|
||||
|
||||
dataSource.setUser(database.getUsername());
|
||||
dataSource.setPassword(database.getPassword());
|
||||
dataSource.setURL(database.getJdbcUrl() + "?useSSL=false");
|
||||
dataSource.setURL(database.getJdbcUrl() + "?useSSL=false&allowPublicKeyRetrieval=true");
|
||||
|
||||
return dataSource;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user