When trying to connect from MyBatis and jdbc to mysql 5.6 I get an exception
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: communications link failure
This only happened after upgrading from 5.1 to 5.6.
I looked at the driver official page. the latest available driver is for 5.1.
I encountered this problem too, then I realized I didn't have the WAMP server open. Check if you have opened WampServer (or LampServer if you are using Linux).
The problem was in the configuration in
/etc/my.cnf
it looks like 5.6 doesn't accept all configuration items as 5.1. I had to remove
default-character-set=utf8
to start the mysql-server
and had to remove
bind-address = ?
for to resolve the exception I was getting in my question above. and start tomcat applications.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.