Having chroot Problems with MySQL

Mark Phillips mark at phillipsmarketing.biz
Wed Jun 2 14:03:37 MST 2010


On Wed, Jun 2, 2010 at 1:24 PM, Matt Graham <danceswithcrows at usa.net> wrote:

> From: Mark Phillips <mark at phillipsmarketing.biz>
> > On Wed, Jun 2, 2010 at 9:47 AM, Matt Graham wrote:
> >> From: Mark Phillips <mark at phillipsmarketing.biz>
> >>> write(1, "error: 'Can't connect to local My"..., 94)
> >>> write(1, "Check that mysqld is running and "..., 88)
> >> Translation:  The local socket (probably in /var/run/mysqld/mysqld.sock
> )
> >> doesn't exist for some reason.
> > socket          = /var/run/mysqld/mysqld.sock
> > Does it have to read
> > socket          = /opt/chroot/lenny-i386/var/run/mysqld/mysqld.sock
> >
> > the full path to the chroot var/mysqld? I thought everything in the
> chroot
> > only knew about the chroot and could not look past it.
>
> The first socket= line is correct.  If it's running in the chroot, then
> /opt/chroot/lenny-i386/ is its / .
>
> >> So logger exists in /usr/bin/ , which makes me think it's trying to use
> >> logger to write to some sort of syslog daemon at some point.  I would
> >> install a syslog daemon (syslog-ng or metalog or something....) in the
> >> chroot and run it just to see if other junk is going on
> > I think the logger setup is correct.
>
> You said you weren't running a syslog daemon inside the chroot, though.  If
> you're not running a syslogd-ng or metalog, then the /dev/log socket won't
> exist, and logger will fail silently (or stupidly) as will many things that
> expect to use the syslog facility to log errors.  Since errors are usually
> useful when you're getting a system up and running, you need them.
>
> So: install and start a syslog daemon in the chroot.  Also, the Debian
> mysqld
> start script takes the meat of the command and redirects all its stdout and
> stderr to /dev/null.  You probably should start it manually with
> /usr/bin/mysqld_safe in the chroot, and see if you get any error messages
> on
> your console.  That may say something about missing libraries, or bad dir
> permissions somewhere, or something.
>

You win the GOLD STAR for the day! I installed syslog-ng, started mysql and
got this error message is syslog
Jun  2 20:58:00 orca mysqld[19435]: 100602 20:58:00 [ERROR] Can't start
server: Bind on TCP/IP port: Address already in use

The light bulb went on, and the doh! moment happened.....mysql was running
on the 64 bit squeeze side of the chroot jail.....Once I stopped it, the
chroot mysql started without a hiccup!

Thanks for all your help and polite  insistence on installing syslog. I will
install it on ALL my current and new installations ASAP!!!!!

You the man!

Mark

>
> --
> Matt G / Dances With Crows
> The Crow202 Blog:  http://crow202.org/wordpress/
> There is no Darkness in Eternity/But only Light too dim for us to see
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20100602/c3975caa/attachment.htm>


More information about the PLUG-discuss mailing list