Having chroot Problems with MySQL

Matt Graham danceswithcrows at usa.net
Wed Jun 2 08:41:44 MST 2010


From: Alex Dean <alex at crackpot.org>
> On Jun 2, 2010, at 10:12 AM, Mark Phillips wrote:
>> On Wed, Jun 2, 2010 at 8:02 AM, Alex Dean wrote:
>>> On Jun 2, 2010, at 9:35 AM, Mark Phillips wrote:
>>>> Starting MySQL database server: mysqld failed!
>>> Check the mysql error log & syslog in your chroot to see if you can  
>>> figure out why MySQL failed to start.
>> Looking in my chroot, there is nothing in /var/log/mysql.err, /var/ 
>> log/mysql.log, or /var/log/mysql. I mean no entries.
> You mean the files exist, but are 0 length?  I wonder what created  
> them.  Maybe the debian post-install scripts.  Would the mysql user be  
> able to write to those files & directories, or are they owned by root  
> or some other user?

The post-install script should've chowned the mysql log files to mysql.  Hm,
are the /etc/passwd and /etc/group files in the chroot set up OK?  I know, you
probably checked that, but you didn't say anything about it.

> It looks like you have all binaries & libraries installed, but some  
> post-installation tasks have failed to complete.  You might try  
> starting mysql yourself, and see if that gives you any more clues  
> about what's wrong.

Yeah.  And if that gives you no useful info, there's always the nuclear
option:  "strace -ff /etc/init.d/mysql start > strace.log 2>&1" .  That'll
produce a LOT of output, but somewhere within the last ~2000 lines of the
file, there should be something like "open("/usr/lib/mysql/something") : -1
ENOENT (no such file or dir) " that will a) not exist b) be completely vital
c) not be in any error message that gets reported.  BTDT, with Orrible.

Also also, if you're using InnoDB, and you copied the MySQL data dir from a
data dir that was being used on another arch (like a 64-bit MySQL data dir
being copied to a 32-bit data dir), then make sure you don't have the old
ib_logfile* files sitting in the data dir.  *That* will make 5.0.51a fail on
start with really confusing/stupid/pointless error messages.  At least it did
the last time I tried that.

-- 
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



More information about the PLUG-discuss mailing list