[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Permission denied while opening odbcinst.ini
Hi all!
I'm trying to configure an OpenLDAP server with a mySQL server as back-end.
This is what happens when i try to start the server.
root@ldap:~# slapd -d1
---------
backsql_open_db_handle(): SQLConnect() to database "MySQL" failed.
Return code: -1
nativeErrCode=0 SQLengineState=IM002 msg="[unixODBC][Driver
Manager]Data source name not found, and no default driver specified"
---------
I couldn't find anything wrong with my configuration (see odbc.ini and odbcinst.ini below) so i tried strace:
root@ldap:~# strace -o /tmp/out.txt slapd
root@ldap:~# grep odbc /tmp/out.txt
open("/usr/lib/libodbc.so.1", O_RDONLY) = 3
open("/etc/odbcinst.ini", O_RDONLY) = -1 EACCES (Permission denied)
access("/etc/odbc.ini", F_OK) = 0
stat64("/etc/odbc.ini", {st_mode=S_IFREG|0644, st_size=598, ...}) = 0
open("/etc/odbcinst.ini", O_RDONLY) = -1 EACCES (Permission denied)
Permissions of odbc.ini and odbcinst.ini
root@ldap:/etc# ls odbc*.ini -l
-rw-r--r-- 1 root root 598 2008-05-23 08:50 odbc.ini
-rw-r--r-- 1 root root 549 2008-05-23 08:49 odbcinst.ini
Contents of my odbc.ini and odbcinst.ini:
odbc.ini:
---------
[MySQL]
Description = MySQL test database
Driver = MySQL
SERVER = 192.168.100.38
USER = root
PASSWORD = ***
PORT = 3306
DATABASE = kplatsen
----------
odbsinst.ini
----------
[MySQL]
Description = MySQL driver for Linux & Win32
Driver = /usr/lib/odbc/libmyodbc3.so
Setup = /usr/lib/odbc/libmyodbc3S.so
FileUsage = 1
[Default]
Driver = /usr/lib/odbc/libmyodbc.so
UsageCount = 1
----------
I've tested the ODBC-connection with:
root@ldap:~# isql MySQL
and it works...
Please help!