If one is testing the sql backend functionality of openldap in connection with a MySQL Database, it is likely that slapd will not start. The following error can be observed when starting slapd with debugging enabled by using the -d 1 parameter:
backsql_load_schema_map(): error executing at_query:
Return code: -1
Native error code: 1054
SQL engine state: S0022
Message: [unixODBC][TCX][MyODBC]
Unknown column 'sel_expr_u' in 'field list'
==>backsql_free_db_conn()
backsql_free_db_conn(): closing db connection
This error appears as the MySQL Templates shipped with openldap 2.2 are broken and have been so for quite some time. :-(
The short workaround ist adding the sel_expr_u row to your ldap_attr_mappings table as follows:
ALTER TABLE `ldap_attr_mappings` ADD `sel_expr_u` VARCHAR( 255 ) AFTER `sel_expr` ;
However, there are more problems...