LinuxThreads should be installed before configuring MySQL!
MySQL requires libc version 5.4.12 or newer. glibc version 2.0.6 and later should also work. There has been some problems with the glibc rpms from RedHat so if you have problems, check if there are any updates!
On some older Linux distributions configure may give a error
about: Syntax error in sched.h. Change _P to __P in the
/usr/include/sched.h file.\
See the Installation chapter in the Reference Manual. Just do what the
error says and add a extra underscore to the _P macro that only
has one underscore. Then try again.
You may get some warnings when compiling: (these can be ignored)
mysqld.cc -o objs-thread/mysqld.o mysqld.cc: In function `void init_signals()': mysqld.cc:315: warning: assignment of negative value `-1' to `long unsigned int' mysqld.cc: In function `void * signal_hand(void *)': mysqld.cc:346: warning: assignment of negative value `-1' to `long unsigned int'
If you want in Debian GNU/Linux to get MySQL to auto start when system boots, do the following:
> cp scripts/mysql.server /etc/init.d/mysql.server > /usr/sbin/update-rc.d mysql.server defaults 99
If mysqld always core dumps when starting, the problem may be that you have an old `/lib/libc.a'. Try renaming this, remove sql/mysqld and do a new make install and try again. This problem has been reported on some Slackware installations. RedHat 5.0 has also a similar problem with some new glibc versions. More about this later.
If you install all the official redhat patches (including glibc-2.0.6-9 and glibc-devel-2.0.6-9) it should work out of the box (se above for how to configure).
The updates are needed since there is a bug in glibc 2.0.5 in how pthread_key_create variables are freed. With glibc 2.0.5 you must use the static-linked MySQL binary distribution. If you want to compile from source you must install the corrected version of Linuxthreads from http://www.tcx.se/Downloads/Linux or upgrade your glibc.
If you have a wrong glibc or linuxthread version the symptom is that
mysqld crashes after each connections. For example mysqladmin version
will crash mysqld when it finishes!
Another symptom of wrong libraries is that mysqld crashes at once when it
starts. One some Linux systems this can be fixed by configuring with
LDFLAGS=-static ./configure. On some RedHat 5.0 system it will only
work WITHOUT LDFLAGS=-static. This is known to happen even with
new versions as glibc 2.0.7-4 !
For the source distribution of glibc 2.0.7 you can find a patch at
http://www.tcx.se/Download/Linux/glibc-2.0.7-total-patch.tgz
that is easy to apply and is tested with MySQL!
If you experience crashes like these when you build MySQL, you can always download the newest binary version of MySQL. This is compiled staticly to avoid library conflicts and should work on all Linux systems!
If you want to compile this yourself, check how to debug mysqld! As MySQL comes with an internal debugger its very easy to get a trace file that probably will help solve your problem very quickly! See section Debugging MySQL
Go to the first, previous, next, last section, table of contents.