Xtrabackup 1.6.4 for Solaris 10 and 11

If you need Xtrabackup for Solaris 10 and 11 (x64), you can download it from the link on the following page:


Fwiw, we needed this for a server, and it’s not a standard package available for download, so I just wanted to make this available to all.

(Sorry if you’ve read this for a third time, and for the double link – I think the planet mysql feed might reject posts with direct ftp links.)

Hope this helps.

Setting up MySQL SSL on Multiple Machines

Managing SSL certificates for MySQL can be somewhat of a pain, especially when setting it up on multiple machines.

I looked around on the web, and didn’t really run into any mentions of how to do this for multiple machines, so I dug into it a bit more.

If you’ve created the certificates before, you’ll know you get prompted for various bits of information during a couple of the steps (country, state, email).

However, this can be by-passed by using the -batch option with the openssl command.

So, to set this up for multiple servers, just loop through the following 5 commands for your servers:

cd C:\mysql\certs
openssl genrsa 2048 > ca-key.pem
openssl req -new -x509 -nodes -days 3600 -batch -key ca-key.pem > ca-cert.pem
openssl req -newkey rsa:2048 -days 3600 -batch -nodes -keyout server-key.pem > 
openssl x509 -req -in server-req.pem -days 3600 -CA ca-cert.pem 
	-CAkey ca-key.pem -set_serial 01 > server-cert.pem

This will create the following 5 files:

ca-cert.pem, ca-key.pem, server-cert.pem, server-key.pem, and server-req.pem

Those are all that is needed to set up SSL for MySQL.

Then, just add the following lines to the [mysqld] section of your my.cnf/my.ini files:

ssl-ca	 = C:\mysql\certs\ca-cert.pem
ssl-cert = C:\mysql\certs\server-cert.pem
ssl-key	 = C:\mysql\certs\server-key.pem

Ensure you have an SSL user created, and then start up mysqld.

You can connect with the following command:

mysql -ussluser -p --ssl-key=

Connection Output:

mysql> status;
mysql  Ver 14.14 Distrib 5.5.16, for Win32 (x86)

Connection id:          1
Current database:
Current user:           ssluser@localhost
SSL:                    Cipher in use is DHE-RSA-AES256-SHA
Using delimiter:        ;
Server version:         5.5.16-log MySQL Community Server (GPL)
Protocol version:       10
Connection:             localhost via TCP/IP
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    cp850
Conn.  characterset:    cp850
TCP port:               3430
Uptime:                 8 sec

Threads: 1  Questions: 4  Slow queries: 0  Opens: 33  ...

Hope this helps.


Adding Sidebar Navigation to WordPress Posts

If you haven’t noticed, the sidebar navigation appears on the “Home Page” and on “Pages”, but not on “Posts”.

If you’d like to add the “sidebar” navigation to all of your “Posts”, you just need to make 2 edits in the single.php (/wp-content/themes/default/) page.

First (and this is not even strictly necessary – it just makes the body text “left-justified” instead of “centered” as it is on the Home Page and Pages) change the first “div” from:




Then, to add the sidebar navigation, invoke the following function as the 2nd to last line of code:


It should be just before:


Hope this helps.

Maintaining (and Building) your MySQL Source Tree on Windows

I just have one last post to round out my series on building MySQL and MariaDB on Windows.

Before, I showed how to obtain the latest source tree and build it. In this one, I simply want to show how easy it is to continue off of that.

So it’s been a week or so, and now you want the latest fixes:

  1. cd C:\mysql-5.5\mysql-5.5
  2. bzr pull
  3. cmake . -DBUILD_CONFIG=mysql_release
  4. VS: File -> Open -> Solution -> MySql.sln
  5. VS: Build -> Build Solution
  6. VS: Right-click “PACKAGE” -> Build (in “Solution Explorer” View)

Simple as that. :)

Your “no-install” package will be located at:


Full Outputs for Reference:

C:\Users\Chris>cd C:\mysql-5.5\mysql-5.5
C:\mysql-5.5\mysql-5.5>bzr pull
Using saved parent location: bzr+ssh://bazaar.launchpad.net/%2Bbranch/mysql-server/5.5/
Connected (version 2.0, client Twisted)
Authentication (publickey) successful!
Secsh channel 1 opened.
+N  mysql-test/suite/innodb/r/innodb_bug12400341.result
+N  mysql-test/suite/innodb/t/innodb_bug12400341-master.opt
+N  mysql-test/suite/innodb/t/innodb_bug12400341.test
+N  mysql-test/suite/sys_vars/r/innodb_change_buffering_debug_basic.result
+N  mysql-test/suite/sys_vars/r/innodb_trx_rseg_n_slots_debug_basic.result
+N  mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test
+N  mysql-test/suite/sys_vars/t/innodb_trx_rseg_n_slots_debug_basic.test
 M  CMakeLists.txt
 M  client/mysqldump.c
 M  cmd-line-utils/libedit/chartype.h
 M  cmd-line-utils/libedit/eln.c
 M  cmd-line-utils/libedit/readline.c
 M  mysql-test/collections/default.experimental
 M  mysql-test/extra/rpl_tests/rpl_extra_col_master.test
 M  mysql-test/include/show_slave_status.inc
 M  mysql-test/include/wait_for_slave_io_error.inc
 M  mysql-test/r/func_time.result
 M  mysql-test/r/key_cache.result
 M  mysql-test/r/mysqlcheck.result
 M  mysql-test/r/mysqldump.result
 M  mysql-test/r/partition_key_cache.result
 M  mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result
 M  mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test
 M  mysql-test/suite/rpl/r/rpl_log_pos.result
 M  mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
 M  mysql-test/suite/rpl/r/rpl_packet.result
 M  mysql-test/suite/rpl/t/rpl_log_pos.test
 M  mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
 M  mysql-test/suite/rpl/t/rpl_packet.test
 M  mysql-test/suite/sys_vars/r/all_vars.result
 M  mysql-test/suite/sys_vars/t/all_vars.test
 M  mysql-test/suite/sys_vars/t/disabled.def
 M  mysql-test/t/func_time.test
 M  mysql-test/t/key_cache.test
 M  mysql-test/t/mysqlcheck.test
 M  mysql-test/t/mysqldump.test
 M  mysql-test/t/partition_key_cache.test
 M  sql/item.cc
 M  sql/sql_admin.cc
 M  storage/innobase/buf/buf0buf.c
 M  storage/innobase/handler/ha_innodb.cc
 M  storage/innobase/ibuf/ibuf0ibuf.c
 M  storage/innobase/include/trx0rseg.ic
 M  storage/innobase/include/trx0sys.h
 M  storage/innobase/row/row0mysql.c
 M  storage/innobase/trx/trx0sys.c
 M  storage/myisam/mi_preload.c
All changes applied successfully.
Now on revision 3691.
C:\mysql-5.5\mysql-5.5>cmake . -DBUILD_CONFIG=mysql_release
-- MySQL 5.5.21
-- Configuring done
-- Generating done
-- Build files have been written to: C:/mysql-5.5/mysql-5.5

5. VS: Build -> Build Solution

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
1>Checking Build System
========== Build: 97 succeeded, 0 failed, 1 up-to-date, 10 skipped ==========

6. VS: Right-click “PACKAGE” -> Build

1>------ Build started: Project: INFO_BIN, Configuration: Debug Win32 ------
2>------ Build started: Project: INFO_SRC, Configuration: Debug Win32 ------
1>Build log was saved at "file://c:\mysql-5.5\mysql-5.5\INFO_BIN.dir\Debug\BuildLog.htm"
1>INFO_BIN - 0 error(s), 0 warning(s)
2>Build log was saved at "file://c:\mysql-5.5\mysql-5.5\INFO_SRC.dir\Debug\BuildLog.htm"
2>INFO_SRC - 0 error(s), 0 warning(s)
3>------ Build started: Project: PACKAGE, Configuration: Debug Win32 ------
3>Performing Post-Build Event...
3>CPack: Create package using ZIP
3>CPack: Install projects
3>CPack: - Install project: MySQL
3>CPack: Compress package
3>CPack: Finalize package
3>CPack: Package C:/mysql-5.5/mysql-5.5/mysql-5.5.21-win32.zip generated.
3>Build log was saved at "file://c:\mysql-5.5\mysql-5.5\PACKAGE.dir\Debug\BuildLog.htm"
3>PACKAGE - 0 error(s), 0 warning(s)
========== Build: 3 succeeded, 0 failed, 96 up-to-date, 0 skipped ==========



Related Build Links:


FOSDEM MySQL and Friends Devroom 2012 Changes

As many of you know, the schedule had been set for FOSDEM.

Giuseppe had posted the full schedule here:


However, I refreshed the FOSDEM list (provided at fosdem.org) and noticed some changes to the schedule late last week.


Specifically, I noticed new talks by Oli Sennhauser (“New Features in MySQL 5.6″), Alexey Yurchenko (“Galera 2.0″), Steve Hardy (“Optimizing your innodb buffer pool usage”), Liz van Dijk (“Virtualized Databases”), and Stéphane Combaudon (“Practical indexing guidelines”).

(And all of the previous folks (Ralf Gebhardt, Stéphane Varoqui, Ivan Zoratti, Sergey Petrunya, Vladimir Fedorkov, Giuseppe Maxia, Mark Riddoch, Kenny Gryp, and Frédéric Descamps) still have talks too.)

So an already very impressive lineup has been improved even more! Kudos! :)

Building MariaDB 5.1 on Windows

Recently, I found myself needing MariaDB 5.1.60 for Windows for some testing purposes. Therefore, I needed to build it from source. I ended up using what I’d call a “blend” of the commands listed in this “how-to” and the readme file INSTALL-WIN-SOURCE, so I thought I’d post those steps.

  1. Download 5.1.60 MariaDB source from here.
  2. cd C:\mariadb-5.1
  3. win\configure.js
  4. cmake .
  5. VS: File -> Open -> Solution -> MySql.sln
  6. VS: Build -> Build Solution
  7. VS: Right-click “PACKAGE” -> Build (in “Solution Explorer” View)

That’s it.

Let’s fire it up:

MariaDB> select version();
| version()            |
| 5.1.60-MariaDB-debug |

MariaDB> show global variables like 'innodb_version';
| Variable_name  | Value       |
| innodb_version | 1.0.17-13.0 |

MariaDB> show engines;
| Engine     | Support | Comment		   ...
| CSV        | YES     | CSV storage engine	   ...
| InnoDB     | DEFAULT | Percona-XtraDB, Supports t...
| PBXT       | YES     | High performance, multi-ve...
| MARIA      | YES     | Crash-safe tables with MyI...
| MyISAM     | YES     | Default engine as of MySQL...
| FEDERATED  | YES     | FederatedX pluggable stora...
| MRG_MYISAM | YES     | Collection of identical My...
| MEMORY     | YES     | Hash based, stored in memo...


For reference, here are my full outputs:

C:\Users\Chris>cd ..\..\mariadb-5.1


C:\mariadb-5.1>cmake .
-- Check for working C compiler: cl
-- Check for working C compiler: cl -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: cl
-- Check for working CXX compiler: cl -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
build CSV as static library (libcsv.lib)
build FEDERATEDX as static library (libfederatedx.lib)
build HEAP as static library (libheap_s.lib)
build MARIA as static library (libmaria_s.lib)
build MYISAM as static library (libmyisam_s.lib)
build MYISAMMRG as static library (libmyisammrg_s.lib)
build PBXT as static library (libpbxt_s.lib)
build XTRADB as static library (libxtradb.lib)
build ARCHIVE as DLL (ha_archive.dll)
build BLACKHOLE as DLL (ha_blackhole.dll)
build EXAMPLE as DLL (ha_example.dll)
build FEDERATED as DLL (ha_federated.dll)
build INNODB_PLUGIN as DLL (ha_innodb_plugin.dll)
-- Configuring done
-- Generating done
-- Build files have been written to: C:/mariadb-5.1

Open Visual Studio -> File -> Open -> Project/Solution -> Select C:\mariadb-5.1.60\MySql.sln

Build Solution Output:

========== Build: 79 succeeded, 0 failed, 2 up-to-date, 2 skipped ==========

Package Build Output:

1>------ Build started: Project: PACKAGE, Configuration: Debug Win32 ------
1>Performing Post-Build Event...
1>CPack: Create package using NSIS
1>CPack: Install projects
1>CPack: - Install project: MySql
1>CPack: -   Install component: Unspecified
1>CPack: -   Install component: headers
1>CPack: -   Install component: mysqltest
1>CPack: -   Install component: runtime
1>CPack: -   Install component: scripts
1>CPack: -   Install component: sqlbench
1>CPack: Compress package
1>CPack: Finalize package
1>CPack: Package C:/mariadb-5.1/MariaDB-5.1.60-win32.exe generated.
1>Build log was saved at "file://c:\mariadb-5.1\PACKAGE.dir\Debug\BuildLog.htm"
1>PACKAGE - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 81 up-to-date, 0 skipped ==========



MySQL 5.5 Windows Build Appendix : Full Outputs and Common Errors from Building MySQL 5.5 on Windows

The other day, I posted a “how-to” article for building MySQL 5.5 on Windows from the source code tree.

In an attempt to keep the post as brief as possible, I omitted many outputs, as well as a number of common bugs/problems one could encounter, and so I just wanted to follow-up with some of that in this “appendix” of sorts.

This way, folks who run into any issues might find solutions to those problems here.

I’ll start with the outputs first, followed by the common problems.

Outputs (When works as expected):


Output from Obtaining Source Code:

C:\Users\Chris>cd C:\

C:\>bzr init-repo --trees mysql-5.5
Shared repository with trees (format: 2a)
  shared repository: mysql-5.5

C:\>cd mysql-5.5

C:\mysql-5.5>bzr branch lp:mysql-server/5.5 mysql-5.5
Connected (version 2.0, client Twisted)
Authentication (publickey) successful!
Secsh channel 1 opened.
Branched 3674 revision(s).


Output from Building/Compiling Source Code:

C:\mysql-5.5>cd mysql-5.5

C:\mysql-5.5\mysql-5.5>cmake . -DBUILD_CONFIG=mysql_release -G "Visual Studio 9 2008"
-- Check for working C compiler: cl
-- Check for working C compiler: cl -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: cl
-- Check for working CXX compiler: cl -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void *
-- Check size of void * - done
-- MySQL 5.5.21
-- Disable authenticode signing for executables
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - not found.
-- Found Threads: TRUE
-- Looking for fedisableexcept
-- Looking for fedisableexcept - not found
-- Check size of time_t
-- Check size of time_t - done
-- Performing Test TIME_T_UNSIGNED
-- Performing Test TIME_T_UNSIGNED - Failed
-- Cannot find wix 3, installer project will not be generated
-- Configuring done
-- Generating done
-- Build files have been written to: C:/mysql-5.5/mysql-5.5


Output from VS 2008 Express Build:

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
1>Checking Build System
1>CMake is re-running because build system is out-of-date.
1>-- MySQL 5.5.21
1>-- Configuring done
1>-- Generating done
1>-- Build files have been written to: C:/mysql-5.5/mysql-5.5
...  ...
========== Build: 93 succeeded, 0 failed, 5 up-to-date, 10 skipped ==========


Output from Testing:


mysql> select version();
| version()        |
| 5.5.21-debug-log |
mysql> show engines;
| Engine             | Support | Comment	   ...
| FEDERATED          | NO      | Federated MySQL st...
| MRG_MYISAM         | YES     | Collection of iden...
| MyISAM             | YES     | MyISAM storage eng...
| BLACKHOLE          | YES     | /dev/null storage ...
| CSV                | YES     | CSV storage engine...
| MEMORY             | YES     | Hash based, stored...
| ARCHIVE            | YES     | Archive storage en...
| InnoDB             | DEFAULT | Supports transacti...
| PERFORMANCE_SCHEMA | YES     | Performance Schema...


Error Section:


Error Connecting to Launchpad via Bazaar (bzr):

C:>bzr branch lp:mysql-server/5.5 mysql-5.5

Connected (version 2.0, client Twisted)
Authentication (publickey) failed.
bzr: ERROR: Connection error: Unable to authenticate to SSH host as
supported auth types: ['publickey']


If you encounter the above, then likely you’ve selected the wrong key or it’s not correct. See this page for even further details.


CMake Errors:

Signtool.exe Error:

CMake Error at cmake/install_macros.cmake:155 (MESSAGE):
  signtool is not found.  Signing executables not possible
-- Configuring incomplete, errors occurred!


In my case, I searched my computer and had a signtool.exe, just not in a location that was in the $PATH, so I added that tool to the $PATH.


Stdint.h not found Error:

-- Looking for stdint.h
-- Looking for stdint.h - not found


You can download stdint.h from here, and then save it to C:\Program Files\Microsoft Visual Studio 9.0\VC\include\.

Before re-running CMake again, you should delete CMakeCache.txt.


CMAKE_HAVE_PTHREAD_H not found Error:

-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - not found.


This is a known bug, but harmless on Windows, so you can ignore it.


CMake TIME_T_UNSIGNED Failed Error:

-- Performing Test TIME_T_UNSIGNED
-- Performing Test TIME_T_UNSIGNED - Failed


This is also a known bug, but it can also be safely ignored.


CMakeLists.txt Location Error:

CMake Error: The source directory "C:/build/mysql-5.5" does not appear to contain CMakeLists.txt.


You’re in the wrong directory, ‘cd’ to the location where CMakeLists.txt resides.


CMake – Cannot find source file “cmake_dummy.cc”:

cmake ..
Cannot find source file "cmake_dummy.cc"


Upgrading CMake from 2.6 (2.6.4) to 2.8 (2.8.7) worked and eliminated this error. You can download it from here.


Build / Compile Errors:


Visual Studio 2005 Errors:

If you try to compile MySQL 5.5 with VS 2005, you’ll likely see tons of syntax errors (I won’t post them all here). While you can use VS 2005 for building MySQL 5.1 and MariaDB 5.1, you’ll need to use VS 2008 to build MySQL 5.5.


m4: Invalid argument Error:

4>------ Build started: Project: GenServerSource, Configuration: Debug Win32 ------
4>Generating sql_yacc.cc, sql_yacc.h
4>C:\Program Files\GnuWin32\bin\bison.exe: m4: Invalid argument
4>Project : error PRJ0019: A tool returned an error code from "Generating sql_yacc.cc, sql_yacc.h"


Installing this to a location with no spaces should help. However, I did that and still had problems. The only way I found to move past this (at least for now) is to copy the file to $BUILD-DIR/sql/ (specifically, in this case, C:\mysql-5.5\mysql-5.5\sql\). After that, and after deleting CMakeCache.txt (in $BUILD/), I could finally move past this error.

I have subsequently resolved this m4 issue fully, so there is no need to copy this file. You can read the full details on that here:



Building PACKAGE NSIS Error:

1>Performing Post-Build Event...
1>CPack Error: Cannot find NSIS registry value. This is usually caused by NSIS not being installed. 
1>Please install NSIS from http://nsis.sourceforge.net
1>CPack Error: Cannot initialize the generator NSIS
1>Project : error PRJ0019: A tool returned an error code from "Performing Post-Build Event..."


Installing NSIS (per the instructions) resolved this error.



Hope this helps :)


How to Build MySQL 5.5 from Source Code on Windows

Not counting obtaining the source code, and once you have the prerequisites satisfied, [Windows] users can build from source code in 5 easy steps.

Prerequisites – Install & ensure they are in the $PATH:

  1. CMake <-- Download
  2. C++ compiler <-- Visual Studio 2008 Express - Free Download
  3. Bison <-- Download (ensure m4.exe is also included, which it should be)

Optional (but most likely you’ll want):

  1. Perl <-- For Test Suite/Scripts. Strawberry Perl is a great option.
  2. Bazaar <-- If want latest source tree

Tip: Install these in locations where spaces are not in the path. Specifically, watch for the Bison/m4 as there is a known bug with regards to that.


Now that that’s out of the way, we can begin. You just need to decide if you want to build from source code you download or from the latest development tree.

This will walk through building from the latest development tree (since the downloaded version requires no extra steps – just grab it from any mirror).

Also, this post assumes you can connect to the Launchpad repository via Bazaar and download the source (i.e., you’ll have to create SSH keys to connect to Launchpad – see this write-up for more details. You might also need Pageant too, if you don’t already have it.)

I. Prerequisite Checks:

C:\>cmake --version
cmake version 2.6-patch 4

C:\>bison --version
bison (GNU Bison) 2.4.1

C:\>m4 --version
m4 (GNU M4) 1.4.13

C:\>perl --version
This is perl 5, version 12, subversion 3

C:\>bzr --version
Bazaar (bzr) 2.4.1


II. Obtain Source Code (skip this if you download the source directly from a mirror):

  1. Open Pageant -> Add Key -> Select your SSH Key (for Launchpad)
  2. cd C:\
  3. bzr init-repo –trees mysql-5.5
  4. cd mysql-5.5
  5. bzr branch lp:mysql-server/5.5 mysql-5.5


III. Build/Compile Source Code:

  1. cd mysql-5.5
  2. cmake . -DBUILD_CONFIG=mysql_release -G “Visual Studio 9 2008″
  3. Copy m4.exe to $basedir/sql <-- this avoids any m4.exe errors (or fix this permanently if this affects you)
  4. Open Solution in VS: File -> Open -> Project/Solution -> C:\mysql-5.5\mysql-5.5\MySQL.sln
  5. Now build in VS: Build -> Build Solution (or F7)
========== Build: 93 succeeded, 0 failed, 5 up-to-date, 10 skipped ==========

There you have it! (Assuming you have “0 failed”, otherwise, you’ve got some debugging to do.)


For those interested, I have full outputs, and common errors (with their solutions) from the entire process here:

MySQL 5.5 Windows Build Appendix : Full Outputs and Common Errors from Building MySQL 5.5 on Windows


Build Notes (step #2 above):

The -DBUILD_CONFIG=mysql_release flag uses the same build options used for official releases, which are stored in cmake/build_configurations/mysql_release.cmake.

The simplest you could use is: cmake . -G “Visual Studio 9 2008″

Or you could specify a number of options: cmake . -DMYSQL_SERVER_SUFFIX=-chris -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 -DWITHOUT_BLACKHOLE_STORAGE_ENGINE=1 -G “Visual Studio 9 2008″

The -G lets know which compiler will be used. In this case, I’m using VS 2008 Express. If you were using VS 2005, it’d be “Visual Studio 8 2005″, but I’m not sure if VS 2005 will even work.

This command should end with something like “– Build files have been written to: C:/…” or you’ll need to debug.

Lastly, the cmake command creates the MySQL.sln file and all .vcproj files.


IV. Kicking the tires …

Creating a “package” in Visual Studio is quite simple:

In the “Solution Explorer” view (far right-hand side of page), right-click on “PACKAGE” -> then “Build”.

If you have problems with this, it can be pieced together easily enough:

  1. Make main dir mysql-5.5.xx
  2. Make subdir bin/ – copy in all .exe files (from client/debug, sql/debug, */debug, etc.)*
  3. Make subdir data/ – copy from sql/data/
  4. Make subdir scripts/ – copy from scripts/ (at least all perl, sql, and sh scripts)
  5. Make subdir share/ – copy from sql/share/
  6. Create my.ini

* Notes re: .exe files: mysqld.exe is located in /sql/debug/ and mysql.exe is located in /client/debug/. The remaining .exe files are located in /client/debug/, /sql/debug/, /extra/debug/, /libmysql/debug/, /mysys/debug/, /scripts/debug/, /storage/myisam/debug/, /storage/heap/debug/, and /tests/debug/.

Now start mysqld:

mysql> select version();
| version()        |
| 5.5.21-debug-log |

Of course you should test it a bit more than that, but I’ll leave that to you.