安装数据库提示无法解析机器名处理
2016-07-23 22:22
411 查看
作者:吴炳锡 来源:http://www.mysqlsupport.cn/ 联系方式: wubingxi#163.com 转载请注明作/译者和出处,并且不能用于商业用途,违者必究.
在做MySQL初始化时,如果机器的名不能进行反解会出现以下错误:
WARNING: The host 'node2' 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 !
#/usr/local/mysql/bin/resolveip node2
/usr/local/mysql/bin/resolveip: Unable to find hostid for ‘node2′: host not found
处理过程如下
1. 查看机器的名
#hostanme
node2
2. 查看/etc/hosts文件
#cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
可见/etc/hosts中无相应的机器名
添ip(本机的ip) 到机器的对应到/etc/hosts中:
最终/etc/hosts内容如下:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 10.10.60.148 node2
3.使用resolveip确认是否ok
#/usr/local/mysql/bin/resolveip node2
IP address of node2 is 10.10.60.148
4. 在次运行初始化程序
cd /usr/local/mysql ./script/mysql_db_install
Good luck!
相关文章推荐
- 缓存-redis
- grails数据库部署
- MongoDB 删除数据库
- MongoDB 删除数据库
- MongoDB 删除数据库
- MySQL绿色版在windows部署方案
- spark sql 入门详解
- 在Windows 10上安装Oracle 11g数据库出现的问题及解决
- MYSQL函数学习
- mysql 主键 外键
- mysql处理高并发,防止库存超卖
- 使用FireBird数据库和管理工具IBExpert过程的问题与解决方法
- spark sql thrift server搭建及踩过的坑
- Redis教程分享系列:2.Redis安装
- 坑爹的Oracle安装
- SSM框架基础入门学习1——servlet入门实例(包含mysql增查,实例免费下载)
- Redis学习笔记五——启动警告问题的解决
- 【学习笔记】Redis(4)-事务
- mysql5.6解压版安装
- 第十一章 MySQL运算符