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

Re: Re: problem with database sql for ldap



i am sorry, here with is a complete detail of the steps i have followed with the log


install the following RPMS
mysql-3.22.32
libiodbc-2.50-3
libiodbc-devel-2.50-3

added data to mysql using 
mysql < backsql_create.sql
mysql < testdb_create.sql
mysql < testdb_data.sql
mysql < testdb_metadata.sql

cd openldap2.0.15

./configure --enable-sql

according to the docs from  install 

 To build slapd with back-sql under Unix you need to build and install
iODBC 2.50.3 (later versions should probably work, but not earlier),
or unixODBC (you will have to change -liodbc to -lodbc then).
Then, at top of OpenLDAP source tree, run
"configure <other options you need> --enable-sql", then "make" -
this should build back-sql-enabled slapd, provided that you have iODBC/unixODBC
libraries and include files in include/library pathsextracted openldap 2.0.15

i changed -liodbc to -lodbc 

make depend
make 
make install
make test
edit /etc/opdbc.ini
edit slapd.conf
start slapd with debugging mode 5

outpu of slapd -d 5
@(#) $OpenLDAP: slapd 2.0.15-Release (Tue Nov 20 13:35:49 IST 2001) $
	root@a1000:/tesri/openldap-2.0.15/servers/slapd
daemon_init: ldap://a1000
daemon_init: listen on ldap://a1000
daemon_init: 1 listeners to open...
ldap_url_parse_ext(ldap://a1000)
daemon: initialized ldap://a1000
daemon_init: 1 listeners opened
a1000 init: initiated server.
==>backsql_initialize()
<==backsql_initialize()
==>backsql_db_init()
==>backsql_init_db_env()
<==backsql_init_db_env()
<==backsql_db_init()
==>backsql_db_config()
<==backsql_db_config(): dbname=OpenLink
==>backsql_db_config()
<==backsql_db_config(): hostname=a1000
==>backsql_db_config()
<==backsql_db_config(): dbuser=xxxx
==>backsql_db_config()
<==backsql_db_config(): dbpasswd=xxxx
==>backsql_db_config()
<==backsql_db_config(): oc_query=SELECT id,name,keytbl,keycol,create_proc,delete_proc,expect_return FROM ldap_oc_mappings
==>backsql_db_config()
<==backsql_db_config(): at_query=SELECT name,sel_expr,from_tbls,join_whe
e,add_proc,delete_proc,param_order,expect_return FROM ldap_attr_mappings WHERE oc_map_id=?
==>backsql_db_config()
<==backsql_db_config(): subtree_cond=ldap_entries.dn LIKE CONCAT('%',?)
==>backsql_db_config()
<==backsql_db_config(): insentry_query=INSERT INTO ldap_entries (dn,oc_map_id,parent,keyval) VALUES (?,?,?,?)
==>backsql_db_config()
<==backsql_db_config(): delentry_query=DELETE FROM ldap_entries WHERE id=?
a1000 startup: initiated.
==>backsql_db_open(): testing RDBMS connection
==>backsql_get_db_conn()
==>backsql_open_db_conn()
Segmentation fault (core dumped)

Contents of slapd.conf

include		/usr/local/etc/openldap/schema/core.schema
include		/usr/local/etc/openldap/schema/cosine.schema
include		/usr/local/etc/openldap/schema/inetorgperson.schema

pidfile		/usr/local/var/slapd.pid
argsfile	/usr/local/var/slapd.args

database	sql
suffix		"dc=ldapsql,dc=com"
rootdn		"cn=Manager,dc=ldapsql,dc=com"
rootpw		secret
#directory	/usr/local/var/openldap-sql

dbname		ldap_mysql
dbhost 		a1000
dbuser	  	dist
dbpasswd 	operator
oc_query 	"SELECT id,name,keytbl,keycol,create_proc,delete_proc,expect_return FROM ldap_oc_mappings"
at_query	"SELECT name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return FROM ldap_attr_mappings WHERE oc_map_id=?"

subtree_cond	"ldap_entries.dn LIKE CONCAT('%',?)"

insentry_query	"INSERT INTO ldap_mysql (dn,oc_map_id,parent,keyval) VALUES (?,?,?,?)"
delentry_query	"DELETE FROM ldap_entries WHERE id=?"



On Mon, 26 Nov 2001 Dmitry Kovalev wrote :
> Hello,
> 
> > i am using openldap-2.0-15  with backend mysql.
> > i have installed mysql already
> > and added the data according to the concept file of
> > doc
> > ...
> > and started the slapd server but :-((
> > did not work. can anyone tell me where am i going
> > wrong
> > Help please
> >
> > ==>backsql_db_open(): testing RDBMS connection
> > ==>backsql_get_db_conn()
> > ==>backsql_open_db_conn()
> >
> 
> well, you've cut your logs on most interesting point
> these lines?..
> Did it write out anything else? If it did - please post 
> these messages..
> 
> Also, why would you use OpenLink to connect to mySQL 
> server, when there is
> good old plain ODBC driver for mySQL - myODBC?..
> 
> 

regards 
reeti