Hi Todd,

This is probably a problem with these lines in /etc/rc.vsd

ip=`cat /etc/hosts | awk {'print $1'}`

and then

/usr/bin/safe_mysqld --bind-address=$ip & > /dev/null 2>&1

As you can see by default the IP address that MySQL binds to is obtained by
reading /etc/hosts

if /etc/hosts is different from this

yourvs.youdom 10.0.0.5

you will have problems because of the way the IP to bind to is defined.

We suggested fixed this by changing

ip=`cat /etc/hosts | awk {'print $1'}`

to

ip=`hostname -i`

James at DSVR has warned us that this might not work with all hostname
versions and may give unexpected results but if you need to use your
/etc/hosts file for whatever reason as we did when we developed (DNS had
cached a dead record for our payment gateways IP) this problem then it might
be worth making the change.

I would imagine there is a reason that it is the way it is though and since
I probably have no clue compared to most contributors I'll disclaim myself
from any problems arising out of the use of my advice and recommend you
leave /etc/hosts alone instead.

I'd appreciate some feed back as to weather this makes any sense to anyone
else of if I am just talking out of (cough, cough)

All the best,


Brendan McLoughlin
Fubra Group

www.fubra.com
Direct Line: +44 (0)1252 680616
ICQ#: 86373692

----- Original Message -----
From: Webmaster (U.S. ISP, Inc.) <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 20, 2001 10:05 PM
Subject: Re: Starting of MySQL


> I implemented this script and when I do a vsboot or rebootvs I get two
> problems.
>
> 1. bind():Address already in use
> and
> 2. Starting mysqld daemon with databases from /var/lib/mysql
>     010420 16:52:13 mysqld ended (it hangs here for a return)
>
> It starts mysql and then ends it soon after. I think it might have
something
> to do with the first error.
>
> Anyone have any help for me?
>
> Thanks.
> Todd
>
> ----- Original Message -----
> From: "Bill Brigden" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, April 17, 2001 2:36 PM
> Subject: Re: Starting of MySQL
>
>
> > 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]
> > >
> >
> >
>

Reply via email to