Showing entries 1 to 2
Displaying posts with tag: Upstart (reset)
New year & new blog

The new year is here and I have moved my (so far quite silent) blog to use WordPress and MySQL 5.5 GA.

Since I am using Ubuntu I downloaded a compressed tar archive. I installed it in a custom directory and for starting I wrote a little upstart script.

$ cat /etc/init/mysql-5.5.conf
start on startup
stop on shutdown

env basedir=/opt/mysql/mysql-5.5
env defaults=/etc/mysql-5.5/my.cnf

        cd $basedir
        $basedir/bin/mysqld_safe --defaults-file=$defaults
end script

In wp-config.php I have set:

define('DB_HOST', …
[Read more]
Ubuntu Upstart for automatic MySQL start and stop - Part 2

I've done a little change to the upstart script I published in a recent blogpost. The issue is with mysqld_safe which has a few issues it seems, but so far I haven't tracked them down exactly. Anyway, if mysqld_safe is not in your path and you run it with the full path (as I do in the Upstart script which is run by root that may well not have the mysql bin directory in it's path), then mysqld_safe will behave strange in at least 5.5 when called with the full path, i.e.
/mnt/mysql/bin/mysqld_safe --defaults-file=/etc/mysql/my.cnf &
will not work. If I then put the appropriate directory in my path, like this:
/mnt/mysql/bin/mysqld_safe --defaults-file=/etc/mysql/my.cnf &
It still will not work as expected. In the first case, it complains that it cannot find …

[Read more]
Showing entries 1 to 2