Socket closed exception on connecting to mysql database

Hi, I am having issues connecting to my database. The test connection works and this is the output:

DBMS: MySQL (ver. 5.6.10) Case sensitivity: plain=exact, delimited=exact Driver: MySQL Connector/J (ver. mysql-connector-java-8.0.15 (Revision: 79a4336f140499bd22dd07f02b708e163844e3d5), JDBC4.2) Ping: 171 ms SSL: yes

When I try to actually look at the schema or make a query, I get an IOException that the socket is closed. I know it says SSL: yes in the test output, but I am able to connect to this database with the same options (host, database name, password, user, port) in two other DB applications, so I assume something is set wrong in DataGrip. 

Here is my database event log error: Socket is closed.
Communications link failure.
The last packet successfully received from the server was 80 milliseconds ago. The last packet sent successfully to the server was 132 milliseconds ago.

Sometimes it connects for a second or two and then disconnects again. I'm not seeing why DataGrip can't connect/stay connected. Other DB applications do not have this issue. Thanks!


I ran into the same error message when using the wrong driver. Switching from "MySQL" to "MySQL for 5.1" under the General tab on the connection config resolved my issue.