免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1884 | 回复: 1
打印 上一主题 下一主题

执行./bin/mysql_install_db时报错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-05-02 10:29 |只看该作者 |倒序浏览
下面是我的安装教程:

首先,去对应的网站下载最新版本的源码。为了保持系统目录分布的一致性,建议把他们解开到/usr/local/src 目录:

#cd /usr/local/src
#tar xvfz filename.tar.gz
先介绍MySQL的安装:

# cd /usr/locl/src/mysql-3.23.35
# ./configure --prefix=/usr/local/mysql
这样就把MySQL 的安装目录设置为 /usr/local/mysql ,然后运行make 来编译源代码,接下来就可以用 make install 来安装了。

安装完毕后,需要把MySQL 库加入系统,采用ldconfig 命令来实现:

#echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
#ldconfig -v | grep libmysqlclient
然后可以看到系统返回:

libmysqlclient.so.10 => libmysqlclient.so.10.0.0
让MySQL 在启动时自动运行:

#echo "/usr/local/mysql/bin/safe_mysqld > /dev/null &" >> /etc/rc.d/rc.local


接下来初始化数据库(切换到/usr/local/mysql 目录):

# ./bin/mysql_install_db


到这一步就报错了,如下:
Neither host 'localhost' nor 'localhost' could not be looked up with
/usr/local/mysql/bin/resolveip
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option

我的主机名已经改成了'localhost',可还是保如上的错误,我又执行./bin/resolveip时有如下信息:
./bin/resolveip Ver 2.3, for pc-linux-gnu (i686)
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Get hostname based on IP-address or IP-address based on hostname.

Usage: ./bin/resolveip [OPTIONS] hostname or IP-address
  -?, --help          Displays this help and exits.
  -I, --info          Synonym for --help
  -s, --silent        Be more silent.
  -V, --version       Displays version information and exits.

Variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- -----------------------------
silent                            FALSE


我就不知道该如何解决了,然后据说可以查看/etc/hosts文件,我看了看hosts文件的信息如下:
[root@wxn mysql]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
[root@wxn mysql]#

接下来我就不知道该怎么办了,请教一下!谢谢!

论坛徽章:
0
2 [报告]
发表于 2006-05-02 19:50 |只看该作者
原帖由 keddywxn 于 2006-5-2 10:29 发表
下面是我的安装教程:

首先,去对应的网站下载最新版本的源码。为了保持系统目录分布的一致性,建议把他们解开到/usr/local/src 目录:

#cd /usr/local/src
#tar xvfz filename.tar.gz
先介绍MySQL的安 ...


应该是你的机子hosts文件的问题
你在/etc/hosts里添加
127.0.0.1            localhost
再试试看
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP