MySQL------代码1024,can't get hostname for your address解决方法

时间:2024-01-06 21:33:44

1.hosts文件问题

进入C:\Windows\System32\drivers\etc\hosts
查看里面是否包含:
# 127.0.0.1 localhost
没有则添加,再重启MySQL服务

2.重置sock

打开cmd.exe
输入tracert 127.0.0.1 //看能不能回调本机
成功后
输入netsh winsock reset
重启MySQL服务