Unable to online MySQL resource which installed non-default location.

book

Article ID: 100012125

calendar_today

Updated On:

Description

Error Message

 

2014/02/21 19:13:25 VCS INFO V-16-1-10298 Resource ip_mysql (Owner: Unspecified, Group: mysql_SG) is online on server1 (VCS initiated)

2014/02/21 19:13:25 VCS NOTICE V-16-1-10301 Initiating Online of Resource mysql_res (Owner: Unspecified, Group: mysql_SG) on System server1  <----------------------  stuck

2014/02/21 19:18:06 VCS ERROR V-16-55031-20149 (server1) MySQL:mysql_res:online: Failed to online resource

2014/02/21 19:18:06 VCS INFO V-16-2-13716 (server1) Resource(mysql_res): Output of the completed operation (online)

 

==============================================

140221 19:13:25 mysqld_safe Logging to '/mysql/logs/mysql-bin.err'.

140221 19:13:25 mysqld_safe The file /usr/local/mysql/bin/mysqld does not exist or is not executable.

Please cd to the mysql installation directory and restart this script from there as follows:

./bin/mysqld_safe&

See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information

==============================================

Cause

VCS engine log

============

##  VCS engine_A.log shows the monitor looking for the mysql binary location incorrectly,

[5000] PID [1860] PPID [1064] CMD [/usr/local/mysql/bin/mysqld --defaults-file=/mysql/my.cnf --basedir=/mysql/product/mysql5.6.15 --datadir=/mysql/data --plugin-dir=/mysql/product/mysql5.6.15/lib/plugin --log-error=/mysql/logs/mysql-bin.err --open-files-limit=1500 --pid-file=/mysql/tmp/mysrtp.pid --socket=/mysql/tmp/mysqld.sock --port=3306]

ffdc:20059: Matched process PID [1860] PPID [1064]

Process [mysqld]

Srch Process [(?^:/mysql/product/mysql5.6.15.*mysqld\b.*/mysql/data)]

FLM Status [100]

 

main.cf

======

MySQL mysql_res (

Critical = 0

MySQLUser = mysql

MySQLAdmin = admin

MySQLAdminPasswd = passwd

EnvFile = "/mysql/env"

BaseDir = "/mysql/product/mysql5.6.15"  <--------  customer installed mysql here

DataDir = "/mysql/data"

MyCnf = "/mysql/my.cnf"

HostName = server1

MonitorProgram = "/mysql/scripts/mysql_check"

)

VCS MySQL online script uses the mysqld_safe to startup MySQL server instance as MySQL recommends

MySQL agent functions in VCS

Online attempts to start the MySQL server instance with the command like following:

$ BaseDir/bin/mysqld_safe --defaults-file=MyCnf  --datadir=DataDir --user=MySQLUser

 

Then, mysqld_safe will find location of 'mysqld' based on $BaseDir or MyCNF.  But, it seems like mysqld_safe script is failing to find actual location of mysqld.

 

 

Resolution

Veritas modified the MySQL agent startup procedure to change working directory to BaseDir before executing MySQL startup command.  HotFix is avilable:

VRTSmysql_5.1.3.1

Or

The issue could be worked around by creating a symbolic link on the default location, /usr/local/mysql/bin/mysqld.  MySQL installation guide recommends to do it as well, See https://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information.

 


Applies To

RHEL6.4 2.6.32-358.el6.x86_64 

MySQL 5.1.66-2

VRTSmysql-5.1.2.0-GA


 

Issue/Introduction

Unable to online MySQL resource which was installed on non-default location using binary(.tar.gz) distribution.  
OnlineEntryPoint failed to online resource