Wrong mysqld or pid file error

Asked by Andreas Kalsch on 2009-06-16

When I start my sandbox with "./start" it will not work. The start.log says:

090616 17:10:57 mysqld_safe Logging to '/home/andi/sandboxes/msb_5_1_23/data/msandbox.err'.
090616 17:10: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:
See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information

It seems that the basedir (which is correctly set in my.sandbox.cnf) does not seem to have any effect on the choice of the mysqld script. Possible actions:

1) "./start --ledir=homedir/version/bin" will work ... but
2) If I have setup the box with my own my.cnf file, it will not work. Then the start.log will say:

090616 17:13:29 mysqld_safe Logging to '/home/andi/sandboxes/msb_5_1_23/data/msandbox.err'.
090616 17:13:29 mysqld_safe Starting mysqld daemon with databases from /home/andi/sandboxes/msb_5_1_23/data
090616 17:13:32 mysqld_safe mysqld from pid file /home/andi/sandboxes/msb_5_1_23/data/mysql_sandbox5123.pid ended

Pretty confusing ... I don't get it running with my own config file.

Question information

English Edit question
MySQL Sandbox Edit question
No assignee Edit question
Solved by:
Andreas Kalsch
Last query:
Last reply:

I need some information to identify the problem:

1) operating system user that created this sandbox (the user that executed make_sandbox, not the one
   used to install MySQL::Sadnbox)
2) MySQL Sandbox version
3) operating system
4) the exact string used to install the sandbox

Thanks for your feedback

1) non-root
2) 3.0.04
3) Debian GNU/Linux squeeze/sid
4) make_sandbox mysql-5.1.23-beta-GIS-linux-i686-glibc23.tar.gz -m /etc/mysql/my.cnf

This is the MySQL version with support of the full OpenGIS feature set. I tried to install this one before without MySQL sandbox, and I had the same issues. Probably it is because some settings interfere with my main installation (a 5.0.x) or the binaries contain errors (beta).

I have seen that my.sandbox.cnf will just overwrite the settings for the settings - great feature!

Thanks for the quick reply.

Just a guess, trying to identify the problem. There might be a vital option that is not being handled correctly by the sandbox.

There are a few tests we can do:

1) make sure that the only server running is the main one in the directory where it was installed by Debian
2) install again, without the -m option, and see if it works.

3a) if it does, then the problem is in the my.sandbox.cnf options file. copy it to http://pastebin.com and send the resulting link, or send it by email to gmax AT cpan dot ORG

3b) if it doesn't, I will need to install a Debian system and try to reproduce the error. (I am traveling, and it will take a few days before I will be able to do it)

What I have done:

- Removed the 5.1.23 and sandbox dirs
- "mysqld_safe &"
- "make_sandbox mysql-5.1.23-beta-GIS-linux-i686-glibc23.tar.gz"
- Installed properly, but ...

andi@mesolt11:~/sandboxes/msb_5_1_23$ ./start
................... sandbox server not started yet

Same error in start.log as before: ".. mysqld_safe The file /usr/local/mysql/bin/mysqld does not exist or is not executable .."

Additionally, I just tried another binary (5.1.35) and this one works fine.

I remember now that there was an issue with 5.1.23. The mysql_install_db didn't work properly. If that's the case, however, you should see a message in the output of make_sandbox.

The workaround that I used with 5.1.23 was to copy mysql_install_db from a working version into the ./scripts directory of the expanded tarball.

This is what make_sandbox outputs. How can I make a sandbox from an expanded tarball? To add a dir will not work. However - I have to fiddle around some more ... ;)

andi@mesolt11:~$ make_sandbox mysql-5.1.23-beta-GIS-linux-i686-glibc23.tar.gz
unpacking /home/andi/mysql-5.1.23-beta-GIS-linux-i686-glibc23.tar.gz
Executing low_level_make_sandbox --basedir=/home/andi/5.1.23 \
        --sandbox_directory=msb_5_1_23 \
        --install_version=5.1 \
        --sandbox_port=5123 \
        --no_ver_after_name \
    The MySQL Sandbox, version 3.0.04
    (C) 2006,2007,2008,2009 Giuseppe Maxia
installing with the following parameters:
upper_directory = /home/andi/sandboxes
sandbox_directory = msb_5_1_23
sandbox_port = 5123
check_port = 0
no_check_port = 0
datadir_from = script
install_version = 5.1
basedir = /home/andi/5.1.23
my_file =
operating_system_user = andi
db_user = msandbox
db_password = msandbox
my_clause = log-error=msandbox.err
prompt_prefix = mysql
prompt_body = [\h] {\u} (\d) > '
force = 0
no_ver_after_name = 1
verbose = 0
load_grants = 1
no_load_grants = 0
no_show = 0
do you agree? ([Y],n) Y
loading grants
................... sandbox server not started yet
Your sandbox server was installed in $HOME/sandboxes/msb_5_1_23

the expanded tarball is in /home/andi/5.1.23

so you should replace /home/andi/5.1.23/scripts/mysql_install_db with a working one, and then call

$ make_sandbox /home/andi/5.1.23

This didn't work, too.

Finally, I have compiled it for myself from https://code.launchpad.net/~mysql/mysql-server/mysql-5.1-wl1326
It's working now with some fixes in my own my.cnf.

it seems that the problem was version 5.1.23, then.