Note: near the end of the script, when starting the mysql daemon, the line
which looks like:
su - mysql -c "/usr/bin/safe_mysqld --bind-address=`hostname`"
>/dev/null 2>&1 &
should have a backslash, like:
su - mysql -c "/usr/bin/safe_mysqld --bind-address=`hostname`" \
>/dev/null 2>&1 &
Sorry about that.
Bill
----- Original Message -----
From: "Bill Brigden" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 17, 2001 7:31 PM
Subject: Starting of MySQL
> Dear all,
>
> After putting things together in the skel on our virtual server, I thought
> it may be useful for others the addon i wrote for /etc/rc.vsd:
>
> # Start MySQL server
> if [ "${mysql_enable}" = "YES" ]; then
> if [ ! -d /var/lib/mysql ] ; then
> echo 'Initializing MySQL database'
> /usr/sbin/useradd -d /var/lib/mysql mysql
> su - mysql -c "/usr/bin/mysql_install_db"
> echo 'Database Initialised'
> fi
> if [ -d "/var/lib/mysql" ]; then echo -n 'starting mysql server: '
> su - mysql -c "/usr/bin/safe_mysqld --bind-address=`hostname`"
> >/dev/null 2>&1 &
> echo 'mysqld'
> fi
> fi
>
> #########
>
> This Checks to see if the database has been setup, and if not, does it on
> startup of the VS.
>
> I hope this helps someone,
> Bill Brigden
> [EMAIL PROTECTED]
>