查看: 87|回复: 0

[Centos] CentOS 6.2 yum 安装MySQL初始化警告的解决方法

[复制链接]

4

主题

0

回帖

0

积分

热心网友

金币
0
阅读权限
220
精华
0
威望
0
贡献
0
在线时间
0 小时
注册时间
2012-7-25
发表于 2024-2-22 00:00:00 | 显示全部楼层 |阅读模式

yum install mysql-server 

初始化时出现以下警告 

[root@fengzhige etc]# /etc/rc.d/init.d/mysqld start 

Initializing MySQL database: WARNING: The host 'fengzhige' could not be looked up with resolveip. 

This probably means that your libc libraries are not 100 % compatible 

with this binary MySQL version. The MySQL daemon, mysqld, should work 

normally with the exception that host name resolving will not work. 

This means that you should use IP addresses instead of hostnames 

when specifying MySQL privileges ! 

Installing MySQL system tables... 

OK 

Filling help tables... 

OK 

按提示,把/etc/hosts添加IP和主机名即可 

如[root@37 etc]# cat /etc/hosts 

复制代码

代码如下:


[root@fengzhige etc]# cat /etc/hosts 
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 
192.168.10.37 fengzhige 
192.168.11.37 fengzhige 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

相关侵权、举报、投诉及建议等,请发 E-mail:qiongdian@foxmail.com

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部