日期:2014-05-16  浏览次数:20714 次

linux上装mysql过程中有错误
linux 在安装mysql-5.1.41-linux-ia64-glibc23.tar.gz过程中;
去到以下步骤:
cd /usr
chown -R mysql ./mysql/
chgrp -R mysql ./mysql/
cd mysql

其中scripts/mysql_install_db --user=mysql这个步骤不通过,出现以下错误:

[root@vatti mysql]# scripts/mysql_install_db --user=mysql
scripts/mysql_install_db: line 244: ./bin/my_print_defaults: cannot execute binary file
Neither host 'vatti' nor 'localhost' could be looked up with
./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

寻求正确的解决方法.

------解决方案--------------------
无法解析本机的hostname
怀疑你的/etc/hosts这个文件有问题
------解决方案--------------------
你输入hostname命令看显示什么?

使用hostname 主机名 来设置主机名 或者在/etc/sysconfig/network中追加一句HOSTNAME=主机名