1、使用mysql通用二进制格式包进行安装,执行scripts/mysql_install_db --user=mysql --datadir=/data/mysql/出现如下报错
  1. scripts/mysql_install_db: line 249: ./bin/my_print_defaults: cannot execute binary file
  2. Neither host 'a.com' nor 'localhost' could be looked up with
  3. ./bin/resolveip
  4. Please configure the 'hostname' command to return a correct
  5. hostname.
  6. If you want to solve this at a later stage, restart this script
  7. with the --force option
发现是32位的平台使用了64位的二进制包。

2、WARNING: The host 'a.com' could not be looked up with resolveip.
本来使用的是在/etc/hosts中本机IP a.com,主机名不规范,导致错误,改为www.a.com,测试OK

3、./bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

查找libaio相关rpm
  1. yum list all libaio*
  2. libaio.i686                                                      0.3.107-10.el6                                                @cdrom
  3. libaio-devel.i686                                                0.3.107-10.el6 
安装所需的包
yum install libaio libaio-devel
测试OK