DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(mysql.info) installing-source

Info Catalog (mysql.info) installing-binary (mysql.info) installing (mysql.info) post-installation
 
 2.8 MySQL Installation Using a Source Distribution
 ==================================================
 

Menu

 
* quick-install                Source Installation Overview
* configure-options            Typical `configure' Options
* installing-source-tree       Installing from the Development Source Tree
* compilation-problems         Dealing with Problems Compiling MySQL
* mit-pthreads                 MIT-pthreads Notes
* windows-source-build         Installing MySQL from Source on Windows
* windows-client-compiling     Compiling MySQL Clients on Windows
 
 Before you proceed with an installation from source, first check
 whether our binary is available for your platform and whether it works
 for you. We put a great deal of effort into ensuring that our binaries
 are built with the best possible options.
 
 To obtain a source distribution for MySQL,  getting-mysql.
 
 MySQL source distributions are provided as compressed `tar' archives
 and have names of the form `mysql-VERSION.tar.gz', where VERSION is a
 number like `5.0.19'.
 
 You need the following tools to build and install MySQL from source:
 
    * GNU `gunzip' to uncompress the distribution.
 
    * A reasonable `tar' to unpack the distribution. GNU `tar' is known
      to work.  Some operating systems come with a pre-installed version
      of `tar' that is known to have problems. For example, Mac OS X
      `tar' and Sun `tar' are known to have problems with long
      filenames. On Mac OS X, you can use the pre-installed `gnutar'
      program. On other systems with a deficient `tar', you should
      install GNU `tar' first.
 
    * A working ANSI C++ compiler. `gcc' 2.95.2 or later, `egcs' 1.0.2
      or later or `egcs 2.91.66', SGI C++, and SunPro C++ are some of the
      compilers that are known to work. `libg++' is not needed when
      using `gcc'.  `gcc' 2.7.x has a bug that makes it impossible to
      compile some perfectly legal C++ files, such as `sql/sql_base.cc'.
      If you have only `gcc' 2.7.x, you must upgrade your `gcc' to be
      able to compile MySQL.  `gcc' 2.8.1 is also known to have problems
      on some platforms, so it should be avoided if a new compiler
      exists for the platform.
 
      `gcc' 2.95.2 or later is recommended when compiling MySQL 3.23.x.
 
    * A good `make' program. GNU `make' is always recommended and is
      sometimes required. If you have problems, we recommend GNU `make'
      3.75 or newer.
 
 If you are using a version of `gcc' recent enough to understand the
 -fno-exceptions option, it is _very important_ that you use this option.
 Otherwise, you may compile a binary that crashes randomly. We also
 recommend that you use -felide-constructors and -fno-rtti along with
 -fno-exceptions. When in doubt, do the following:
 
      CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors \
             -fno-exceptions -fno-rtti" ./configure \
             --prefix=/usr/local/mysql --enable-assembler \
             --with-mysqld-ldflags=-all-static
 
 On most systems, this gives you a fast and stable binary.
 
 If you run into problems and need to file a bug report, please use the
 instructions in  bug-reports.
 
Info Catalog (mysql.info) installing-binary (mysql.info) installing (mysql.info) post-installation
automatically generated byinfo2html