I got exception when i have tried to connect with mysql through jdbc.This type of question is already asked but i didn\'t get solution for my problem, here is my code...
Use new Maven dependencies
mysql mysql-connector-java 8.0.11
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.11</version>
</dependency>
I would try to play around the char encoding sets, for instance you can try to use the following url
String url="jdbc:mysql://localhost:3306/student?autoReconnect=true&useSSL=false&characterEncoding=utf8&useUnicode=true";
I was using a latest version of mysql server with an older version of mysql-connector. Once I updated to the latest connector(8.0.11) this issue cleared up for me.