Allright the, i start the mysql server with this: if [ -x /usr/local/bin/mysqld_safe ] ; then su -c _mysql root -c '/usr/local/bin/mysqld_safe &' > /dev/null & echo -n ' mysql' fi
but the problem still persists , it shows up when executing mysqlcheck -m -A -p Now what? Regards, Marcos ----- Original Message ----- From: "Clint Pachl" <[EMAIL PROTECTED]> Cc: "Marcos Laufer" <[EMAIL PROTECTED]>; <misc@openbsd.org> Sent: Friday, July 13, 2007 6:05 PM Subject: Re: mysql problem Otto Moerbeek wrote: > On Fri, 13 Jul 2007, Marcos Laufer wrote: > > >> I did read the archives, and it helped me to find out that >> restarting mysql fixes it for some time, and i increased the values >> several times but no luck. It starts working fine >> for a while but then again it fails . In the end i have >> this config right now and the problem persists, i can >> reproduce the problem just by executing >> >> mysqlcheck -m -A -p >> > > How are yo starting mysql? You need to explicitly set the login class. > > Somthing like > > su -c mysql root /usr/local/bin/mysqld_safe ... > > -Otto > Otto is right. Here is my /etc/postgresql.rc script, which should give you some ideas for managing mysql (notice ``SU''). #!/bin/sh exec >&2 DATA=/var/postgresql/data LOG=/var/postgresql/log CMD=$1 PUSR=_postgresql PCLS=postgresql CTL=/usr/local/bin/pg_ctl SU="su -l -c $PCLS $PUSR -c" userinfo -e $PUSR || { echo "$PUSR user nonexistent."; exit 1; } grep -q "^${PCLS}:" /etc/login.conf || { echo "$PCLS class nonexistent."; exit 1; } [ -x $CTL ] || { echo "$CTL not executable."; exit 1; } case $CMD in stop|reload|status) $SU "exec $CTL $CMD -D $DATA" ;; start|restart) $SU "exec $CTL $CMD -D $DATA -l $LOG" chmod 644 $LOG ;; *) echo "usage: $0 stop|restart|reload|status|start (will run as $PUSR)" ;; esac And the relevant sections of /etc/login.conf daemon:\ :ignorenologin:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=128:\ :stacksize-cur=8M:\ :localcipher=blowfish,8:\ :tc=default: postgresql:\ :openfiles-cur=768:\ :tc=daemon: -pachl >> -- >> # sysctl kern.maxfiles >> kern.maxfiles=20000 >> --