Portage 2.0.54-r2 (default-linux/x86/2006.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.16-g entoo-r6 i686) ================================================================= System uname: 2.6.16-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz Gentoo Base System version 1.6.14 dev-lang/python: 2.4.2 dev-python/pycrypto: [Not Present] dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 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=i686 -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/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=i686 -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" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 bzip2 minimal nls pam pcre perl python ssl zlib userland_GNU kernel_lin ux elibc_glibc" Unset: ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS , PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS, PORTDIR_OVERLAY
This is expected, if the DATADIR is not there, it will not start... I just checked the ebuilds, and it's all correct, if the "minimal" USE is not set (as minimal MySQL builds don't have the mysqld), then /var/run/mysqld is created correctly. Same goes for /var/lib/mysql and all the other needed directories, so I can't understand the problem... The ebuild will create it, if it didn't, then it may be a Portage bug, some other error (permissions?) or whatever... Best regards, CHTEKK.
So remove USE="minimal" from your flags... Besides, there's nothing to start, no daemon compiled with this flag.
/var/run may be mounted via tmpfs, and /var/run/mysqld (created at emerge stage), not created again after reboot. "minimal" USE is not set, of course. (In reply to comment #1) > This is expected, if the DATADIR is not there, it will not start... > I just checked the ebuilds, and it's all correct, if the "minimal" USE is not > set (as minimal MySQL builds don't have the mysqld), then /var/run/mysqld is > created correctly. Same goes for /var/lib/mysql and all the other needed > directories, so I can't understand the problem... The ebuild will create it, if > it didn't, then it may be a Portage bug, some other error (permissions?) or > whatever... > Best regards, CHTEKK. >
As you know files in /var/run usually cleared when the system boots. For example, /var/run may be mounted via tmpfs, and /var/run/mysqld (created at emerge stage), not created again after reboot. "minimal" USE is not set, of course. (In reply to comment #1) > This is expected, if the DATADIR is not there, it will not start... > I just checked the ebuilds, and it's all correct, if the "minimal" USE is not > set (as minimal MySQL builds don't have the mysqld), then /var/run/mysqld is > created correctly. Same goes for /var/lib/mysql and all the other needed > directories, so I can't understand the problem... The ebuild will create it, if > it didn't, then it may be a Portage bug, some other error (permissions?) or > whatever... > Best regards, CHTEKK. >
(In reply to comment #3) > /var/run may be mounted via tmpfs, and /var/run/mysqld (created at emerge > stage), not created again after reboot. Sigh... How is this mysql or portage problem? So don't do such stuff like putting /var/run on mounts that go away on reboot... If you do, then feel free to fix such self-inflicted problems yourself.
(In reply to comment #4) > As you know files in /var/run usually cleared when the system boots. No, it isn't. mysql specifically does keepdir for this not to happen.
"self-inflicted"? escape ~ # uname -a Linux escape 2.6.16-gentoo-r6 #1 SMP PREEMPT Tue May 9 16:30:32 MSD 2006 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz GenuineIntel GNU/Linux escape ~ # zcat /usr/share/man/man7/hier.7.gz | nroff -man | grep -A 3 /var/run /var/run Run-time variable files, like files holding process identifiers (PIDs) and logged user information (utmp). Files in this direc- tory are usually cleared when the system boots. escape ~ # (In reply to comment #5) > (In reply to comment #3) > > /var/run may be mounted via tmpfs, and /var/run/mysqld (created at emerge > > stage), not created again after reboot. > > Sigh... How is this mysql or portage problem? So don't do such stuff like > putting /var/run on mounts that go away on reboot... If you do, then feel free > to fix such self-inflicted problems yourself. >
I agree with jakub, Sorry, then you need to recreate the needed dirs, in /var/run, to check and create it is _not_ a work for the init.d scripts. The reason for this is that push a check more for thousand of users, for a configuration that only few computers have is not optimal. A suggestion, create a script /etc/init.d/beforemysql with these two functions depend() { before mysql } start { create_all_needed() } and then add it to startup with rc-update. Regards
As `grep mkdir /etc/init.d/*` shows that it is common practice to check necessary dirs at startup and IMO first of all solution must work "correctly" first and only afterwards "optimal", but its IMO only. Especially, if this check run once at [rare] startup. (In reply to comment #8) > I agree with jakub, > Sorry, then you need to recreate the needed dirs, in /var/run, to check and > create it is _not_ a work for the init.d scripts. > > The reason for this is that push a check more for thousand of users, for a > configuration that only few computers have is not optimal. > > > A suggestion, create a script /etc/init.d/beforemysql with these two functions > > depend() { > before mysql > } > > start { > create_all_needed() > } > > and then add it to startup with rc-update. > Regards >