MySQL database rare Bug--can ' t get hostname for your address

Source: Internet
Author: User

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#忽略主机名的方式访问lower_case_table_names=1#忽略数据库表名大小写

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 database rare Bug--can ' t get hostname for your address

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.