This documentation is for an older version. If you're using the most current version, select the documentation for that version with the version switch in the upper right corner of the online documentation, or by downloading a newer PDF or EPUB file.

21.3 Debugging and Porting MySQL

21.3.1 Debugging a MySQL Server
21.3.2 Debugging a MySQL Client
21.3.3 The DBUG Package

This section helps you port MySQL to other operating systems. Do check the list of currently supported operating systems first. See If you have created a new port of MySQL, please let us know so that we can list it here and on our Web site (, recommending it to other users.


If you create a new port of MySQL, you are free to copy and distribute it under the GPL license, but it does not make you a copyright holder of MySQL.

A working POSIX thread library is needed for the server.

Both the server and the client need a working C++ compiler. We use gcc on many platforms. Other compilers that are known to work are Sun Studio, HP-UX aCC, IBM AIX xlC_r), Intel ecc/icc. With previous versions on the respective platforms, we also used Irix cc and Compaq cxx.


If you are trying to build MySQL 5.0 with icc on the IA64 platform, and need support for MySQL Cluster, you should first ensure that you are using icc version 9.1.043 or later. (For details, see Bug #21875.)

To compile only the client, use ./configure --without-server.

If you want or need to change any Makefile or the configure script, you also need GNU Automake and Autoconf. See Section 2.17.2, “Installing MySQL Using a Development Source Tree”.

All steps needed to remake everything from the most basic files.

/bin/rm */.deps/*.P
/bin/rm -f config.cache
./configure --with-debug=full --prefix='your installation directory'

# The makefiles generated above need GNU make 3.75 or newer.
# (called gmake below)
gmake clean all install init-db

If you run into problems with a new port, you may have to do some debugging of MySQL! See Section 21.3.1, “Debugging a MySQL Server”.


Before you start debugging mysqld, first get the test programs mysys/thr_alarm and mysys/thr_lock to work. This ensures that your thread installation has even a remote chance to work!