I could get LDAP started with mysql. One query -
=======================================================
*[root@demo libexec]# ldapsearch -x -b '' -s base '(objectclass=*)'
namingContexts*
# extended LDIF
#
# LDAPv3
# base <> with scope baseObject
# filter: (objectclass=*)
# requesting: namingContexts
#
#
dn:
namingContexts: o=sql,c=RU
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
*[root@demo libexec]# ldapsearch -LLL -s sub -b "o=sql,c=RU"
"(objectClass=*)"
*SASL/DIGEST-MD5 authentication started
Please enter your password:
ldap_sasl_interactive_bind_s: Invalid credentials (49)
additional info: SASL(-13): user not found: no secret in database
======================================================
Why is my second LDAP search not working? Anyone has samples on
inserting/searching records from LDAP with MySQL backend?
On 5/24/07, Ace <rajan.halade(a)gmail.com> wrote:
>
> I got it working now after I restrted my Linux....Its weird...but its
> true!
>
> Thanks for you help!
>
>
> On 5/23/07, Ace <rajan.halade(a)gmail.com> wrote:
> >
> > The funny part here, my odbc test result -
> >
> > ======================================================
> > 1: SQLDriverConnect = [MySQL][ODBC 3.51 Driver]Could not determine the
> > driver name; could not lookup setup library. DSN=(test)
> > (0) SQLSTATE=HY000
> > 1: ODBC_Connect = [MySQL][ODBC 3.51 Driver]Could not determine the
> > driver name; could not lookup setup library. DSN=(test)
> > (0) SQLSTATE=HY000
> > ======================================================
> >
> > Where as LDAP is able to connect to MySQL. I am using "test" database
> > from MySQL and DSN name is "test".
> >
> > One more thing, why was slapd looking for /tmp/mysql.sock? I had
> > specified Socket = /var/lib/mysql/mysql.sock
> >
> > Here is my odbc.ini -
> >
> >
> > ; begin odbc.ini
> > [ODBC Data Sources]
> > test = Connector/ODBC 3.51 Driver DSN
> >
> > [test]
> > Driver = /usr/lib/libmyodbc3.so
> > Description = Connector/ODBC 3.51 Driver DSN
> > Server = localhost
> > DSN = test
> > Port = 3306
> > Socket = /var/lib/mysql/mysql.sock
> > User = root
> > Password = mysql
> > Database = test
> > ServerType = MySQL
> > Option =
> > TraceFile = /var/log/mysql_test_trace.log
> > Trace = 0
> >
> > [Default]
> > Driver = /usr/lib/libmyodbc3.so
> > Description = Connector/ODBC 3.51 Driver DSN
> > Server = localhost
> > DSN = test
> > Port = 3306
> > Socket = /var/lib/mysql/mysql.sock
> > User = root
> > Password = mysql
> > Database = test
> > ServerType = MySQL
> > Option =
> > TraceFile = /var/log/mysql_test_trace.log
> > Trace = 0
> > ;end odbc.ini
> >
> >
> >
> > On 5/23/07, Gabriel Stein <gabrielstein(a)gmail.com > wrote:
> > >
> > > 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
> > >
> > >
> > > Cheers,
> > >
> > > On 5/23/07, Ace <rajan.halade(a)gmail.com > wrote:
> > > >
> > > > 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.51Driver][
> > > > 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
> > > >
> > >
> > >
> > >
> > > --
> > > /\
> > > Gabriel Stein
> > > gabrielstein(a)gmail.com
> > > MSN: gabrielstein(a)hotmail.com
> > > Administrador de Redes -
> > > Network Administrador
> > > Linux User #223750
> > > 51-92796310
> > > Porto Alegre - RS - Brasil
> >
> >
> >
> >
> >
>
>
> --
> I may be miles away... but I am just a mail away.... so keep mailing...!!!
>
> Cheers,
> Rajan