Another way is this:

# MySQL
if [ -x /usr/local/bin/mysqld_safe ]; then
        echo -n ' mysqld'
        rm -f /var/www/var/run/mysql/mysql.sock
        /usr/local/bin/mysqld_safe > /dev/null &
        sleep 10
        ln /var/run/mysql/mysql.sock /var/www/var/run/mysql/mysql.sock
fi

That's my rc.local for starting mysql. Works just fine here :)
This way, it's /var/run/mysql.sock inside and outside the chroot. But
you have to recreate the hardlink if mysql restarts.

-- 
Jonathan

Reply via email to