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

Re: openldap with mysql backend



Michael Jonsson wrote:

Hi,

I'm trying to config the openldap to use mysql, I have rebuild the openldap with the enable-sql option but I still get this error...

line 67 (database sql)
Unrecognized database type (sql)
database sql initialization failed.
slapd shutdown: freeing system resources.
slapd stopped.

Here is the slapd.conf....................
modulepath /usr/sbin/openldap
moduleload back_sql.la

include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema

pidfile /var/run/slapd.pid
argsfile /var/run/slapd.args
defaultsearchbase dc=example,dc=com
idletimeout 0
threads 32
# Debuging level, 0 = none
loglevel -1
access to * by * read

################################################## #####################
# sql database definitions
################################################## #####################

database sql
# This following is for the sample database as it installs
suffix "o=sql,c=RU"
rootdn "cn=root,o=sql,2c=RU"
rootpw {crypt}yZx0a4mg
dbname testdb
dbuser root
dbpasswd
subtree_cond "ldap_entries.dn LIKE CONCAT('%',?)"
insentry_query "INSERT INTO ldap_entries (dn,oc_map_id,parent,keval) VALUES (?,?,?,?)"

It appears that back-sql is not present in your slapd, so it appears as a slapd problem rather than a back-sql problem. You didn't tell us what version of the software you're using. I suggest you clearly inspect the build procedure; what configure args did you use? Since you're trying to load back-sql as a module, what's about --enable-sql and --enable-modules in config.log? What about slapd logging when the back_sql.la module is loaded? Does it succeed? I recall issues with back-sql being built as a module that were fixed long ago, but until you check what version you're using...


p.


SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497