Use JDBC/Mysql Connector in intellij idea
You have to add 'mysql:mysql-connector-java:5.1.40' from maven or add it as java library as shown:
It's easy to configure. First just open the IntelliJ IDE and follow this simple step:
File->Project Structure->Libraries
Then click on the plus(+) sign and select From Maven....
After you'll get a search box. There you should put:
mysql:mysql-connector-java:5.1.40
This will solve the issue.