cd @@BITROCK_MYSQL_ROOTDIR@@
mkdir tmp
chmod 777 tmp
scripts/mysql_install_db  --port=@@BITROCK_MYSQL_PORT@@ --socket=@@BITROCK_MYSQL_ROOTDIR@@/tmp/mysql.sock --old-passwords --datadir=@@BITROCK_MYSQL_ROOTDIR@@/data --pid-file=@@BITROCK_MYSQL_ROOTDIR@@/data/mysqld.pid

if [ `uname -s` = "SunOS" ]; then
    U=`/usr/xpg4/bin/id -u`
    else
    U=`id -u`
fi    
if [ $U = 0 ]; then
   /usr/sbin/useradd mysql
   chown -R root .
   chown -R mysql data
   chgrp -R mysql .
fi

