[Date Prev][Date Next] [Chronological] [Thread] [Top]

QuickStartGuide and MySQL error

Hi everybody,

allthough I carefully searched the mailinglist I couldn't find an
appropriate answer.
My problem migth be simple but I cannot find a solution.

Here we go:
I just installed openldap-2.0.21, MyODBC-2.50.39 and use MySQL-3.23.46 as
backend on Linux RedHat 7.1, kernel 2.4.16.
I created the database tables, installed the users, adapted the
file and slapd starts just fine.
`ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts` returns:
----- snip -----------
version: 2

# filter: (objectclass=*)
# requesting: namingContexts

namingContexts: dc=prager,dc=ws

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1
----- snip -----------

But I can't insert any new entries as shown in the QuickStartGuide.
When I try:
`ldapadd -x -D 'cn=Manager,dc=prager,dc=ws' -f example.ldif`
I get:
adding new entry "dc=prager,dc=ws"
ldap_add: Unknown error
        additional info: SQL-backend error

ldif_record() = 80

And slapd -d5 report:
----- snip -----------
==>backsql_add(): adding entry 'dc=prager,dc=ws'
backsql_add(): cannot determine objectclass of entry -- aborting
send_ldap_result: conn=0 op=1 p=3
send_ldap_result: 80::SQL-backend error
send_ldap_response: msgid=2 tag=105 err=80
ber_flush: 31 bytes to sd 9
----- snip -----------
The file example.ldif contains:
dn: dc=prager,dc=ws
objectclass: dcObject
objectclass: organization
o: Example Company
dc: example

dn: cn=Manager,dc=prager,dc=ws
objectclass: organizationalRole
cn: Manager

dcObject and organizationalRole are defined in core.schema and
I do have this schema in my slapd.conf. I thought that is sufficient
to provide these objectclass entries in the database as well.
Am I mistaken here? What do I miss?

Thanks a lot for any help,
-- Bernd

I found a message earlier in the debug log that might be relevant,
but I'm not sure:
backsql_db_open(): objectclass mapping SQL statement not specified (use
oc_query directive in slapd.conf)

Is there such a mapping statement available?