Whether to enable SSL when using JDBC with MySQL.

SSL is often confused by network libraries. It's like feelings for a girl who is aware of her existence.

 Class.forName("com.mysql.jdbc.Driver");

I want to turn on SSL

jdbc:mysql://localhost:3306/database?verifyServerCertificate=false&useSSL=true

Enable SSL and do not check the certificate.

I want to turn it off

 jdbc:mysql://localhost:3306/database?useSSL=false

Citations

http://www.sumimasen.com/tech/34189756.html

Recommended Posts

Whether to enable SSL when using JDBC with MySQL.
Connect to multiple MySQL instances with SSL enabled in JDBC
I tried connecting to MySQL using JDBC Template with Spring MVC
How to get the query string to actually issue when using PreparedStatement with JDBC
Settings for connecting to MySQL with Spring Boot + Spring JDBC
Connect to MySQL 8 with Java
How to set environment variables when using Payjp with Rails
docker-compose.yml when you want to keep mysql running with docker
How to get started with JDBC using PostgresSQL on MacOS
Things to keep in mind when using Sidekiq with Rails
I can't log in to MySQL from Django when using docker-compose
JDBC connection with MySQL 8.x * Notes *
mysql2 fails to install with bundle install
List of column names when connecting.getMetaData (). GetColumns () of MySQL Table with JDBC
Update MySQL from 5.7 to 8.0 with Docker
Things to keep in mind when using Apache PDFBox® with AWS Lambda
Deploy to heroku with Docker (Rails 6, MySQL)
Connect from Java to MySQL using Eclipse
Using hidden type when PUT with Thymeleaf
Be careful when using rails_semantic_logger with unicorn
[Java] I installed JDBC and tried to connect with servlet + MySQL. (There is a version using DAO / Bean)
[Java] I tried to connect using a connection pool with Servlet (tomcat) & MySQL & Java
Procedure for loading JDBC of MySQL using JAVA-Eclipse
Specify ClassPath when using jupyter + Java with WSL
Steps to play mp3 with haml using audio_tag
Make Volume faster when using Docker with vscode.
Error deploying rails5 + Mysql to heroku with Docker-compose
When making a personal app, I was wondering whether to make it using haml
[Rails] How to solve the error "undefined method` visit'" when using Capybara with Rspec