I am trying to query ODBC compliant databases using pyodbc in ubuntu. For that, i have installed the driver (say mysql-odbc-driver). After installation the odbcinst.ini file with the configurations gets created in the location /usr/share/libmyodbc/odbcinst.ini
When i try to connect to the database using my pyodbc connection code, i get a driver not found error message.
Now when I copy the contents of the file to /etc/odbcinst.ini, it works!
This means pyodbc searches for the driver information in file /etc/odbcinst.ini.
How can I change the location where it searches the odbcinst.ini file for the driver information
Thanks.
Assuming you are using unixODBC here was some possibilities:
BTW, I doubt pyodbc looks anything up in the odbcinst.ini file but unixODBC will. There is a list of ODBC Driver manager APIs which can be used to examine ODBC ini files.