优选主流主机商
任何主机均需规范使用

Linux环境下MySQL数据库初始化常见错误及高效解决方案详解

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

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

service mysqld  start ,执行命令报错:

?

1 2 3 4 5 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,内容如下:

?

1 2 3 4 5 # 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后,启动成功。

未经允许不得转载:搬瓦工中文网 » Linux环境下MySQL数据库初始化常见错误及高效解决方案详解