【发布时间】:2013-03-21 02:53:13
【问题描述】:
我已经从here下载了mysql-5.1.38-linux-x86_64-glibc23.tar.gz
然后我使用下面的命令执行了它
groupadd mysql
useradd -g mysql mysql123
cp mysql-5.1.38-linux-x86_64-glibc23.tar.gz /home /mysql123/
su - mysql123
tar -zxvf mysql-5.1.38-linux-x86_64-glibc23.tar.gz
mv mysql-5.1.38-linux-x86_64-glibc23 mysql
mkdir tmp
cd mysql/
mv suppport-files/my-medium.cnf my.cnf
cp support-files/mysql.server bin/
然后我编辑了 my.cnf 并将 basedir 和 datadir 设置为 /home/mysql123/mysql 和 /home/mysql123/mysql/data 和 innodb_home_dir和日志文件目录到datadir
现在编辑 mysql.server 并在其中正确设置 datadir 和 basedir
然后启动mysql_install_db为
[mysql123@localhost mysql]$ ./scripts/mysql_install_db
./scripts/mysql_install_db: line 244: ./bin/my_print_defaults: cannot execute binary file
Neither host '127.0.0.1' 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
看到错误我认为它可能与 basedir 混淆并执行如下相同
[mysql123@localhost mysql]$ ./scripts/mysql_install_db -–user=mysql123 -–basedir=/home/mysql123/mysql
./scripts/mysql_install_db: line 244: ./bin/my_print_defaults: cannot execute binary file
Neither host '127.0.0.1' 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
我不知道内部发生了什么并显示这种消息
并且我确信我有足够的磁盘空间 (df -h) 并且我拥有适当的所有权 (chown mysq123:mysql /home/mysql123/ -R) 并且适当的权限 (chmod 755 .)
mysql_install_db 中的行如下所示
请帮助解决这个问题非常有用(我必须遵循相同的安装过程)
我正在使用红帽 6
【问题讨论】:
-
我认为您的主机文件不是问题所在。无论如何都不是本地主机。搜索并找到了对可能存在相同问题的人的引用 - 在他们的案例中看起来像是一个错误,他们解决了它。可能想从底部开始;)link
标签: mysql database installation redhat database-administration