What´s your result for odbctest ou iodbctest? This command shows your ODBC connection?
And more: you set your slapd.conf with your ODBC Connection Name, not your MySQL dbname.
For example, if you have a database with name ldap and setup a ODBC connection with name test, you need set test on your
slapd.conf
An ODBC Connection for example, in your /etc/odbc.ini
[ODBC Data Sources]
test = MySQL ODBC 2.50 Driver DSN
[test]
Driver = /usr/local/lib/libmyodbc.so
Description = MySQL ODBC 2.50 Driver DSN
DSN = test
Server = localhost
PORT = 3306
SOCKET = /var/lib/mysql/mysql.sock
User = valid_user
Password = valid_passwd
Database = ldap
ReadOnly = no
ServerType = MySQL
FetchBufferSize = 99
ServerOptions =
ConnectOptions =
OPTION = 3
TraceFile = /var/log/mysql_test_trace.log
Trace = 0
Hi Friends,I am trying to configure LDAP with MySQL 5.0 as backend. I am using Connector/ODBC 3.51 and LDAP 2.3.32 built from sources.While starting slapd I get following error -===============================================backsql_load_schema_map(): oc_query "SELECT id,name,keytbl,keycol,create_proc,delete_proc,expect_return FROM ldap_oc_mappings"
backsql_load_schema_map(): error executing oc_query:
Return code: -1
nativeErrCode=1046 SQLengineState=3D000 msg="[MySQL][ODBC 3.51 Driver][mysqld-5.0.27-standard]No database selected"
==>backsql_free_db_conn()===============================================
My odbc.ini file has all the details and I can see in slapd log that its getting dbname before connective to MySQL server. slapd.conf has dbname = test.Thanks in advance!--
Cheers,
Rajan