	     Installation instructions for mysql source release

QUICK INSTALL:

Unpack tar archive in mysql directory. (VERSION is a number like 3.20.0)
You may want to edit scripts/mysql_install_db to get right grant tables

  zcat mysql-VERSION.tar.gz | tar cvf -
  cd mysql-VERSION
  ./configure

To compile only the client add --without-server to ./configure. If you
don't want to have your data under /usr/local/var use something like.
./configure --prefix=/usr/local --localstatedir=/usr/local/data/mysql

For more configure information se INSTALL-SOURCE-GENERIC. For
configure options use ./configure --help.

Compile and install everything:

  make
  make install

Create the grants database:

The default priviliges is that anybody may create/use the databases
named 'test' or starting with "test_". Root can do anyting. More
information in the FAQ.

To change the defaults edit the script before running it.

  scripts/mysql_install_db

Start the mysql demon with:

  scripts/safe_mysqld --log

------------------------------------------------------------
Problems?

If your compile fails with something like:

configure: error: installation or configuration problem: C++ compiler cannot create executables.

Try setting the environetment variable CXX to gcc (If you are using
gcc). Or install libg++. By default configure picks c++ as a compiler
name and GNU c++ links with -lg++. So another fix is to install
libg++.

making all in mit-pthreads
make: Fatal error in reader: Makefile, line 18: Badly formed macro assignment

This means you have to upgrade your make to GNU make.

------------------------------------------------------------

NOTES:

All mysql programs compile clean (no warnings) for us. But warning may
appear because of different system include files. Se below for
warnings that may occur when using mit-pthreads.

When compiling sql_yacc.y you should probably get: conflicts: 97
shift/reduce

------------------------------------------------------------

LINUX notes:

LinuxThreads should be installed before configureing mysql.
One should install libc 5.4.12 or newer before compiling mysql.

Some Linux distributions have an error in /usr/include/sched.h:
change _P to __P in the above file if you get a compile error in sched.h

You will get some warnings when compiling: (this should 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 are using glibc 2.x be sure to apply the glibc-2.0-sigwait-patch
from http://www.tcx.se/patches
You must also execute the configure with 'CXX=gcc ./configure ....' because
if you compile with g++, you will link with libg++ which dosen't work with
LinuxThreads.

------------------------------------------------------------

SunOS notes:

You must have gnu make to compile MIT threads.

In readline you may get warnings about duplicated defines. These may be
ignored.

When compiling mysqld there will be some warnings about 'implicit declaration
of function'. These may be ignored.

------------------------------------------------------------

Sparc Linux notes:

In some implementations readdir_r is broken.
This will be notised by that SHOW DATABASES always return an empty set.
This can be fixed by removing 'HAVE_READDIR_R' from config.h

------------------------------------------------------------

Alpha-osf1 notes:

In some versions the alloca() is broken.
Fix this by remove 'HAVE_ALLOCA' from config.h.

------------------------------------------------------------

IRIX-SCO notes:

In some Irix implementations alloca is broken. If the mysqld server
dies on some selects remove HAVE_ALLOC from config.h.
If mysqladmin create doesn't work, remove 'HAVE_READDIR_R' from config.h

------------------------------------------------------------


MIT thread notes:

Mit threads doesn't support the AF_UNIX protocol so we must use
the TCP/IP protocol for all connections (which is a little slower).
If you can't connect to a table, try using the host (-h or --host) switch.
This must be done if you have compiled the client code --without-server
because the default connection is to use Unix sockets.

mysql compiled with MIT threads has as default system locking disabled
for performance reasons. One can start the server with system locking
with the --use-locking. Se the FAQ about system locking.

Sometimes (on Solaris) the pthread bind() command sometimes fails to bind to
a socket without any error message. The result of this is that all
connections to server fails:
> mysqladmin ver
mysqladmin: connect to server at '' failed; error: 'Can't connect to mysql server on localhost (146)'

The solution to this is to kill the mysqld demon and restart it.
This has only happened to me when I have forced the demon down and done an
restart at once.

sleep() isn't interruptible with SIGINT (break) in MIT-threads. This is only
notable in 'mysqladmin --sleep'. One have to wait for the end of the sleep
before the interrupt is served and the process stops.

I haven't got readline to work with MIT threads. (This isn't needed, but may
be interesting for someone)

When linking (at least on Solaris) you will receive this error message:

ld: warning: symbol `_iob' has differing sizes:
	(file /my/local/pthreads/lib/libpthread.a(findfp.o) value=0x4; file /usr/lib/libc.so value=0x140);
	/my/local/pthreads/lib/libpthread.a(findfp.o) definition taken
ld: warning: symbol `__iob' has differing sizes:
	(file /my/local/pthreads/lib/libpthread.a(findfp.o) value=0x4; file /usr/lib/libc.so value=0x140);
	/my/local/pthreads/lib/libpthread.a(findfp.o) definition taken


Some other warnings which can be ignored:

implicit declaration of function `int strtoll(...)'
implicit declaration of function `int strtoul(...)'
