Subject: Minor patch needs to be made to mysql pkgsrc (was: Can't get mysql built on NetBSD 1.6)
To: None <netbsd-help@netbsd.org>
From: Mike Begley <spam@hell.org>
List: netbsd-help
Date: 03/08/2003 09:21:30
After fighting to get Mysql functional all yesterday evening, I came
across this article that describes a fix at about 3 am that made it all
work:
http://www.bitmechanic.com/mail-archives/mysql/Mar1998/0902.html
After I applied the two fixes described there, the database seems to act
flawlessly.
Essentially, there's a line commented out in sqfe_mysqld that sets the
ulimit on open file descriptors, that is needed for BSDs. After I
uncommented that line and restarted mysql (and totally rebuilt the
databases) the database worked fine.
Here's a diff that will do the job (after making a copy of
scripts/safe_mysqld to scripts/safe_mysqld-orig):
--- scripts/safe_mysqld-orig Sat Mar 8 02:58:37 2003
+++ scripts/safe_mysqld Sat Mar 8 02:59:18 2003
@@ -229,7 +229,7 @@
# Does this work on all systems?
#if type ulimit | grep "shell builtin" > /dev/null
#then
-# ulimit -n 256 > /dev/null 2>&1 # Fix for BSD and
FreeBSD system
s
+ ulimit -n 256 > /dev/null 2>&1 # Fix for BSD and
FreeBSD system
s
#fi
datemsg "mysqld started"
The article also says that the user can start mysqld setting the table
cache to 32 (the default is 64) in the following manner:
safe_mysqld -O table_cache=3D32
I did both the patch and changed the mysql startup invocation; I don't
know if doing both is unnecessary or has any drawbacks.
-mike begley
spam@hell.org