V901R008版本OMU安装时MYSQL无法安装导致安装失败

发布时间:  2014-06-10 浏览次数:  436 下载次数:  0
问题描述
BSC6000版本:V901R008
现象:
OMU安装时报错,MYSQL无法安装;
Failed to execute CInstallMysql, error:Failed to start mysql!.
You can do it manually,then Enter to continue or
input R to retry
input C to cancel
input E to exit->R
[12:18:111298348291] Decompress file mysql.zip begin...
[12:18:121298348292] Decompress file mysql.zip end.
create_install_path_link succeed!
register mysql service succeed!
Numerical result out of rangeInstalling MySQL system tables...
Installation of system tables failed!

Examine the logs in ./data for more information.
You can try to start the mysqld daemon with:
./bin/mysqld --skip-grant &
and use the command line tool
./bin/mysql to connect to the mysql
database and look at the grant tables:

shell> ./bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in ./data that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the ./bin/mysqlbug script!
groupadd: Group `mysql' already exists.
useradd: User `mysql' already exists.
/bin/sh: line 1: addgroup: command not found
/bin/sh: line 1: adduser: command not found
ERROR: 1  Can't create/write to file '/BSC6000/data/mbsc/mysql/data/mysql/db.MYI' (Errcode: 13)
110222 12:18:14 [ERROR] Aborting
告警信息
处理过程
通过putty登陆OMU,执行以下命令:
# chmod 777 /tmp
# chmod 777 /BSC6000
# chmod 777 /BSC6000/data
# chmod 777 /BSC6000/data/mbsc

执行完成后重新安装,没有再报错,安装成功。
根因
      从输出的log可以看出,在安装过程中,已经成功解压了mysql.zip文件,但在创建表的过程中,提示错误,无法创建和写文件/BSC6000/data/mbsc/mysql/data/mysql/db.MYI。
       从报错信息看:ERROR: 1  Can't create/write to file '/BSC6000/data/mbsc/mysql/data/mysql/db.MYI' (Errcode: 13)表明存在读写权限的问题。
建议与总结
Mysql安装时对LINUX系统的目录权限有要求:
/tmp 目录的权限为777
/BSC6000目录的权限为777
/BSC6000/data目录的权限为777
/BSC6000/data/mbsc目录的权限为777

遇到类似读写权限问题,可以先通过ls -l命令查询文件权限是否符合要求。

END