mysql错误2005-未知的MySQL服务器主机'localhost'(11001) [英] mysql error 2005 - Unknown MySQL server host 'localhost'(11001)

查看:1578
本文介绍了mysql错误2005-未知的MySQL服务器主机'localhost'(11001)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是mysql 5.6.11,它通常会关闭并向我显示:

I was using mysql 5.6.11,it usually turned down and show me this:

2005年-未知的MySQL服务器主机"localhost"(11001).

2005 - Unknown MySQL server host 'localhost'(11001).

目前,我的解决方法是关闭网络,但恢复正常.我进行了很多搜索,但没有找到答案.所以,有人知道原因吗?

Currently my resolution is to turn off the network,than it return to normal.I had searched a lot,but no answer is revalent to it.So,does anyone knows the reason?

推荐答案

错误2005(HY000):未知的MySQL服务器主机'localhost'(0)

ERROR 2005 (HY000): Unknown MySQL server host 'localhost' (0)

修改系统主机名列表:

C:\ Windows \ System32 \ drivers \ etc \ hosts

确保您具有以下条目:

127.0.0.1本地主机
在我的情况下,该条目是0.0.0.0 localhost,这导致了所有问题

127.0.0.1 localhost
In my case that entry was 0.0.0.0 localhost which caussed all problem

(您可能需要更改修改权限才能修改此文件)

(you may need to change modify permission to modify this file)

这会将主机"localhost"的DNS解析为IP地址127.0.0.1.

This performs DNS resolution of host "localhost" to the IP address 127.0.0.1.

这篇关于mysql错误2005-未知的MySQL服务器主机'localhost'(11001)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆