Re: Having chroot Problems with MySQL

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Matt Graham
Date:  
To: Main PLUG discussion list
Subject: Re: Having chroot Problems with MySQL
From: Mark Phillips <>
> On Wed, Jun 2, 2010 at 9:47 AM, Matt Graham wrote:
>> From: Mark Phillips <>
>>> 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.

--
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 -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss