Hi all,

 

Question for you. I've been racking my brains over this one for most the day
without much success, and it seems my Google-Fu is no match for this one.
I'm hoping you can help.

 

I'm attempting to setup OpenLDAP (2.4.13) with back-sql running as a module,
relying on a MySQL server as a backend.

 

My problem appears to be due to the fact I'm trying to run the database
server on a remote host, not the same box as OpenLDAP.

 

Attempting to start OpenLDAP gives the following error:

 

==>backsql_get_db_conn()

==>backsql_open_db_conn()

backsql_open_db_conn: SQLConnect() to database "ldap" as user "dc1auth1"
failed:

Return code: -1

   Native error code: 2002

   SQL engine state:  08S01

   Message:           [MySQL][ODBC 3.51 Driver]Can't connect to local MySQL
server through socket '/var/run/mysqld/mysqld.sock' (2)

backsql_get_db_conn(): could not get connection handle -- returning NULL

backsql_db_open(): connection failed, exiting

 

However, obdc.ini (which has been separately tested) is configured to
connect to the MySQL server on 192.168.1.34. My understanding is that the
dbhost attribute in slapd.conf is ignored - we've set this anyway just to
make sure.

 

Extracts from each:

 

Slapd.conf

 

database        sql

suffix          "dc=imagingthesouth,dc=com,dc=au"

rootdn          "cn=Hostmaster,dc=imagingthesouth,dc=com,dc=au"

rootpw          stat1c

dbname          ldap

dbhost          192.168.1.36

dbuser          dc1auth1

dbpass          dc1auth1

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

insentry_query  "INSERT INTO ldap_entries (dn,oc_map_id,parent,keval) VALUES
(?,?,?,?)"

 

 

 

 

odbc.ini

[ldap]

Description = MySQL connection to Rhapsody

Driver = MySQL

DSN = ldap

Host = 192.168.1.34

Server = 192.168.1.34

Servername = 192.168.1.34

USER   = dc1auth1

PASSWORD = passgoeshere

Database = rhapsody

Port = 3306

Option =

Stmt =

 

I'm slightly out of my depth here - any assistance would be greatly
appreciated!

 

Many thanks,

Jason.

 

 

Reply via email to