Rare BUG in MySQL database -- Can & #39; t get hostname for your address, mysqlhostname

Source: Internet
Author: User

Rare BUG in MySQL database -- Can't get hostname for your address, mysqlhostname

When connecting to mysql jdbc

Com. mysql. jdbc. exceptions. jdbc4.MySQLNonTransientConnectionException: Communication link failure, message from server: "Can't get hostname for your address"

Whether it is using jdbc: mysql: // 127.0.0.1: 3306 or jdbc: mysql: // localhost: 3306, this error occurs.

 

This error indicates that "your address cannot obtain the host name ".Skip-name-resolveParameter, but after this parameter is added, because I am using a windows-installed Service, this error still exists, and finally found a solution in a blog. Http://blog.csdn.net/zzti_erlie/article/details/53227343

 

For the green version of mysql, you need to open my. ini, add

[Mysqld] skip-name-resolve # ignore the host name to access lower_case_table_names = 1 # ignore the case sensitivity of the database table name

Then restart the service. This solution is indeed effective,However, it is ineffective for mysql to install the service.Now!

 

For mysql installed on windows service, you need to click MySQL service in service management, right-click to Open Properties

 

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.