Home > Database > navicat > What does the error 2005 mean when using navicat connection?

What does the error 2005 mean when using navicat connection?

爱喝马黛茶的安东尼
Release: 2019-08-09 11:11:13
Original
9531 people have browsed it

What does the error 2005 mean when using navicat connection?

Error description:

When using navicat to connect to the mysql database, it will appear: mysql error 2005 - Unknown MySQL server host 'localhost' (0) error; when checking the connection information, connection attribute information, user name and password are correct, the IP address is: localhost, the database can be opened normally when there is a network, but when the network is disconnected, error.

Related recommendations: "Navicat for mysql graphic tutorial"

The solution is as follows:

Create using navicat When connecting to mysql, fill in the host or IP address column: 127.0.0.1 instead of localhost. Then test it when the network is disconnected and you will find that the connection can be successful.

Error reason:

When there is a network, localhost will be automatically resolved to 127.0.0.1. When the network is disconnected, localhost is just a string. Represents an ip address.

The above is the detailed content of What does the error 2005 mean when using navicat connection?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template