Bug #36909 error in mysqld_safe when using non default locations
Submitted: 23 May 2008 9:36 Modified: 7 Jun 2008 20:51
Reporter: Oli Sennhauser Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:mysql-5.1.23-ndb-6.2.15 OS:Solaris (10)
Assigned to: Sveta Smirnova CPU Architecture:Any

[23 May 2008 9:36] Oli Sennhauser
Description:
When installing MySQL under /mysql (instead of /usr/local) the script mysqld_safe to start mysql does not work

How to repeat:
bin/mysqld_safe --defaults-file=/home/mysql/product/mysql-5.1.23-ndb-6.2.15/data/my.cnf
080523 11:31:57 mysqld_safe Logging to '/usr/local/mysql/data/error.log'.
080523 11:31:57 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
bin/mysqld_safe: 402: cannot create /usr/local/mysql/data/error.log: Directory nonexistent

Suggested fix:
The problem is located in to reasons:

1. the files errmsg.sys have been moved to from share/english to share/mysql/english or vice versa.
2. the scripts have not been adapted.

207 if test -f ./share/mysql/english/errmsg.sys -a -x ./bin/mysqld
208 then
209   MY_BASEDIR_VERSION=$MY_PWD
210   ledir=$MY_BASEDIR_VERSION/bin
211 # Check for the directories we would expect from a source install
212 elif test -f ./share/mysql/english/errmsg.sys -a -x ./libexec/mysqld

207 → 
    if test -f ./share/english/errmsg.sys -a -x ./bin/mysqld
212 →
    elif test -f ./share/english/errmsg.sys -a -x ./libexec/mysqld
[23 May 2008 16:02] Sveta Smirnova
Thank you for the report.

Verified as described. Not-ndb versions are not affected.
[7 Jun 2008 20:51] Sveta Smirnova
Bug is not repeatable with current mysql-5.1-telco-6.2 tree