MySQL reports error 1042-Can 'tgethostnameforyouraddress

Source: Internet
Author: User
When mysql client is remotely connected to mysql 1042, the error-Can 'tgethostnameforyouraddress is reported, and the connection user is authorized. This error indicates that "your address cannot obtain the host name", and I thought of the skip-name-resolve parameter.

When the mysql 5.5 client is remotely connected, the error 1042-Can't get hostname for your address is reported, and the connection user is authorized. This error indicates that "your address cannot obtain the host name", and I thought of the skip-name-resolve parameter.

Solution:

The Code is as follows:

Vim/etc/my. cnf

Add or modify the following two lines under the [mysqld] node:

The Code is as follows:

Skip-name-resolve

# Ignore host name access

The Code is as follows:

Lower_case_table_names = 1

# Ignore case sensitivity of database tables

Restart the MySQL service.


Note:

If the connection is rejected, your password is incorrect. log on to the server using mysql client and check whether the root user allows remote logon ..


//////////////////////////////////////// //////////////////

What I want to tell you is that the correct linux Password does not mean that the mysql password is also correct.


Although both are root, they are different. One is the root of the operating system and the other is the root of mysql.

Do not think that you have created a mysql account when installing mysql. It is silly to think that he uses system authentication.

The first question is answered.


Linux does not have a firewall. The error message you have given has clearly indicated this point. After your software has been connected to mysql, it is only possible to find that the password is incorrect .... Therefore, the error message is displayed...


The second question is complete.


I feel that there is no substantive relationship between automatic setting and manual setting. As long as the ip address is in the same network segment, they can access each other.

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.