---
title: "127.0.0.1与localhost"
author: "三问飞絮"
date: "2016-01-05T13:46:22Z"
tags: []
categories: ["数据库"]
slug: "127-0-0-1-localhost"
draft: false
lastmod: "2016-01-05T13:46:22Z"
id: 2268660
url: "https://simon-fish.iteye.com/blog/2268660"
---

连接本地的MySQL时，在网络断开的时候，localhost是不识别的，而使用127.0.0.1是OK的。

原因是啥？