Bug #34288 mysqld_safe looks for /share in wrong path
Submitted: 4 Feb 2008 16:25 Modified: 4 Feb 2008 20:00
Reporter: Baron Schwartz (Basic Quality Contributor) Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:6.0.3 OS:Linux
Assigned to: CPU Architecture:Any
Tags: qc

[4 Feb 2008 16:25] Baron Schwartz
Description:
I downloaded mysql-6.0.3-alpha-linux-x86_64-glibc23.tar.gz for my
AMD64 machine to play with it.  I started out with Giuseppe's
mysql-sandbox script to try to set up a throwaway.  This has always
worked great for me before, but the server wouldn't start this time.
I looked in the error log:

080203 09:35:55 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

I tried starting mysqld_safe manually, and got the same thing.  It
looks like it's not detecting the directories right.  So I looked at
the bin/mysqld_safe script and saw this:

205 MY_PWD=`pwd`
206 # Check for the directories we would expect from a binary release install
207 if test -f ./share/mysql/english/errmsg.sys -a -x ./bin/mysqld
208 then
209   MY_BASEDIR_VERSION=$MY_PWD     # Where bin, share and data are
210   ledir=$MY_BASEDIR_VERSION/bin     # Where mysqld is
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
213 then
214   MY_BASEDIR_VERSION=$MY_PWD     # Where libexec, share and var are
215   ledir=$MY_BASEDIR_VERSION/libexec # Where mysqld is
216 # Since we didn't find anything, used the compiled-in defaults
217 else
218   MY_BASEDIR_VERSION=/usr/local/mysql
219   ledir=/usr/local/mysql/bin
220 fi

The problem I see is, there's no share/mysql/english/ directory after
untarring the downloaded file:

baron@kanga:~/mysql_source/6.0.3$ find -name english
./share/english

How to repeat:
Download, untar, try to start mysqld_safe from bin directory.

Suggested fix:
Changing lines 206 and 212 to ./share/english/... worked for me, but I doubt this fix will cover all cases.
[4 Feb 2008 20:00] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

Duplicate of bug #32679