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

Re: SQL Backend Question



Michael Nguyen wrote:




I haven't read that page, but I will. Our current back end is MySQL. However, we are planning to use a software package that requires the use of an LDAP server. Rather than maintain two back end databases (MySQL and LDAP), we decided that it'd be best to either:

- Get OpenLDAP + MySQL working

This could make sense; but as of today I haven't been able to write to MySQL by way of back-sql because MySQL lacks stored procedures.

1) what version of slapd are you using? OpenLDAP 2.2.18 doesn't SIGSEGV
if the database is not properly populated.



This is 2.2.18. I'm actually not sure if the database is properly populated, but I think it is. There's definitely something in it as I used the SQL scripts in ./servers/slapd/back-sql/rdbms_depend/mysql to populate the database. I've looked at the data in the tables and it seems to make sense.

Did you use __ALL__ of them? the sequence is detailed in the FAQ entry below.

2) did you read http://www.openldap.org/faq/data/cache/978.html ? did
you check the FAQ and the mailing lists?  Another (not officially
released yet) source of information is



http://www.openldap.org/devel/cvsweb.cgi/~checkout~/servers/slapd/back-sql/rdbms_depend/README?rev=1.3&hideattic=1&sortbydate=0

I grabbed the test031-component-filter from CVS and tried running it.
However, the script says the following:

## Make sure that you turn on LDAP_COMP_MATCH in slapd source codes
## and --enable-modules  is configured yes

I was unable to find LDAP_COMP_MATCH anywhere.  Is this perhaps named
something else?

There must be a mismatch. The test031 was, for a short while, for back-sql; then the back-sql test was moved to sql-test000, so now test031 has nothing to do with back-sql




3) if you want to play with CVS HEAD code (not that different from
2.2.18 wrt/ back-sql) it contains a (very limited) test suite, which
currently works for PostgreSQL (read/write), IBM db2 (read/partially
write) and MySQL (read-only); from subdirectory test/ do "./run
sql-test000" __AFTER__ populating and starting the database with data
provided in servers/slapd/back-sql/rdbms_depend/*/ (RDBMS dependent in
nature, cannot provide more specific instructions).



I think you're referring to sql-test0000-read. I get some errors when I try to run it as it doesn't seem to be made for the version of OpenLDAP that I downloaded. The errors I'm getting are for the following vars:

BACKSQL
RDBMS
SQLCONF

I edited defines.sh so that BACKSQL and RDBMS were defined, but I didn't
know what I should put for SQLCONF.

The line goes like this:

. $CONFFILTER $BACKEND $MONITORDB < $SQLCONF > $CONF1
$SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &

Thanks a lot for your help, Pierangelo.


That test is meant for use with HEAD code only. If you want to use it with 2.2.18 you need some major reworking. I suggest you only use it as a guideline in testing your setup. The README should be intended as an HOWIDIDIT with the different RDBMSes I could test, not as an authoritative guide to the usage of back-sql.

p.





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