NOTE: If you're using MySQL client library v5.1 or greater, you must pass this to dmd: -version=MySQL_51 This is important - otherwise you will see bizarre segfaults!