当前位置:   首页安装配置

报错初始化:Linux 初始化MySQL 数据库报错解决办法

发布日期:2022-03-01 09:59 | 文章来源:脚本之家

Linux 初始化MySQL 数据库报错解决办法

在Linux CentOS 5 中安装完MySQL (server、devel)之后进行初始化

service mysqld start ,执行命令报错:

 
Neither host 'localhost.localdomain' nor 'localhost' could be looked up with
/usr/bin/resolveip
Please configure the 'hostname' command to return a correct hostname.

错误:

解决办法

1、查看/etc/hosts,内容如下:

# Do not remove the following line, or various programs
# that require network functionality will fail.
::1 localhost.localdomain localhost

2、将::1修改为127.0.0.1后,启动成功。

感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!

联系我们
关于使用场景和技术架构的更多咨询,请联系我们的销售和技术支持团队。
Yingsoo Host

在线
客服

在线客服:7*24小时在线

客服
热线

400-630-3752
7*24小时客服服务热线

关注
微信

关注官方微信
顶部