Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 125150 - mysql-5.0.18-r30 and USE="srvdir" unusable
Summary: mysql-5.0.18-r30 and USE="srvdir" unusable
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-05 16:34 UTC by Nicolas Laplante
Modified: 2006-05-24 06:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Laplante 2006-03-05 16:34:08 UTC
Emerged slotted mysql-5.0.18-r30 with USE="srvdir", which created a /srv/localhost/mysql-500/datadir directory.

But, when I try to start the server, it fails and I get this in the mysqld.log file:

060302  5:02:02 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=valhalla-bin' to avoid this problem.
060302  5:02:02  InnoDB: Started; log sequence number 5 3978839020
060302  5:02:02 [ERROR] bdb:  /srv/localhost/mysql-500/datadir: Permission denied
060302  5:02:02 [ERROR] bdb:  /srv/localhost/mysql-500/datadir/log.0000000001: Permission denied
060302  5:02:02 [ERROR] bdb:  PANIC: Permission denied
060302  5:02:02 [ERROR] bdb:  PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
060302  5:02:02 [ERROR] bdb:  fatal region error detected; run recovery
060302  5:02:02 [ERROR] bdb:  /srv/localhost/mysql-500/datadir: Permission denied
060302  5:02:02 [Note] Recovering after a crash using valhalla-bin
060302  5:02:02 [Note] Starting crash recovery...
060302  5:02:02 [Note] Crash recovery finished.
060302  5:02:02 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only

emerge info:

valhalla ~ # emerge info
Portage 2.0.54 (default-linux/x86/2005.1, gcc-3.4.5, glibc-2.3.5-r2, 2.6.15-ck3-r1 i686)
=================================================================
System uname: 2.6.15-ck3-r1 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.14
ccache version 2.3 [disabled]
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -mtune=pentium3 -fomit-frame-pointer -momit-leaf-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -mtune=pentium3 -fomit-frame-pointer -momit-leaf-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl acpi adns apache2 apm arts avi bash-completion berkdb bitmap-fonts bzip2 caps ccache chroot crypt cscope curl custom-cflags eds emboss encode erandom expat extensions fam foomaticdb gdbm gif glibc-omitfp gmp gpm gstreamer hpn imlib java jpeg junit libclamav libedit libg++ libwww mad max-idx-128 mcal mhash mikmod mmx motif mp3 mpeg mysql ncurses nptl nptlonly oav ogg oggvorbis oss pam pcre pdflib perl php pic png python quicktime readline recode samba sftp spell srvdir sse ssl tcpd tiff truetype truetype-fonts type1-fonts udev unicode userlocales vorbis x86 xml xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Francesco R. (RETIRED) gentoo-dev 2006-03-06 04:17:28 UTC
please report the output of 

ls -ld /srv/localhost/mysql*/datadir

in case the owner of the directory is not mysql:mysql change it with 
chown -R mysql:mysql /srv/localhost/mysql*/datadir
Comment 2 Nicolas Laplante 2006-03-07 20:24:18 UTC
valhalla ~ # ls -ld /srv/localhost/mysql*/datadir
drwxr-x---  8 mysql mysql 400 Mar  7 07:07 /srv/localhost/mysql-500/datadir

I remember seeing during the compilation something like this in the gcc command:

-DDATA_DIR="/var/lib/mysql"

although I used "srvdir", so I think it should have been -DDATA_DIR="//srv/localhost/mysql-500/datadir"

I don't remember where in the compilation it was like this, but maybe it has to do with the problem?
Comment 3 Asfand Yar Qazi 2006-03-08 16:27:02 UTC
I've had this problem too.

When the srv directory is first created by the mysql-5 install, here are what the permissions are for the directories in the srv tree:

# ls -ld /srv
drwxr-x---  3 root root 80 Mar  8 22:46 /srv/

# ls -ld /srv/localhost/
drwxr-x---  3 root root 80 Mar  8 22:46 /srv/localhost//

# ls -ld /srv/localhost/mysql-500/
drwxr-x---  3 root root 72 Mar  8 22:46 /srv/localhost/mysql-500//

I had to do:

# chmod 755 /srv /srv/localhost
# chown mysql:mysql /srv/localhost/mysql-500

For it to work.

Hope this helps.
Comment 4 Ziga Boehm 2006-03-27 00:16:17 UTC
I can confirm that the mysql-5.0.19 ebuild seems to exhibit (with srvdir flag set) similar problem, which by chowning mysql: /srv/localhost/mysql/ magically disappears.
Comment 5 Luca Longinotti (RETIRED) gentoo-dev 2006-05-24 06:29:20 UTC
The actual dev-db/mysql ebuilds work off a /srv/localhost/mysql/datadir directory, that gets created and chowned correctly to mysql:mysql at emerge time, so I'd say this is fixed now.
Best regards, CHTEKK.