When you connect MySQL jdbc, it throws a
Com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:Communication link failure, message from Server: "Can ' t get hostname for your address"
Error, whether it is using jdbc:mysql://127.0.0.1:3306 or jdbc:mysql://localhost:3306, this error has occurred.
This error means "your address can not get host name", Think of skip-name-resolve parameters, but add this parameter, because I use the Windows installation Services, it is still a mistake, finally found in a blog post solution. http://blog.csdn.net/zzti_erlie/article/details/53227343
For the green version of MySQL, you need to open My.ini, plus
[mysqld]
skip-name-resolve
#Ignore hostname access
lower_case_table_names = 1
#Ignore database table name case
Then restart the service, the scheme is really effective, but the installation of the service MySQL is not effective !
For MySQL that is installed to the Windows service, you need to click on the MySQL service in service management and right-open the properties
MySQL communication link failure, message from server: "Can ' t get hostname for your address"