如何在 Linux 中为 ODBC 创建 DSN?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/401358/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I create a DSN for ODBC in Linux?
提问by deadprogrammer
I am digging around in a Linux application that supposedly uses DSNs to connet to SQL Server. The connection stopped working and I can't find the credentials that are being used (all I know is the DSN's name).
我正在研究一个 Linux 应用程序,该应用程序据称使用 DSN 连接到 SQL Server。连接停止工作,我找不到正在使用的凭据(我只知道 DSN 的名称)。
I am familiar with DSNs in Windows, but how are they created and where are they stored in Linux?
我熟悉 Windows 中的 DSN,但它们是如何创建的以及它们在 Linux 中的存储位置?
回答by adilei
回答by initzero
For unixODBC, DSNs are listed in /usr/local/etc/odbc.ini
. Installed ODBC drivers will be listed in /usr/local/etc/odbcinst.ini
.
对于 unixODBC,DSN 列在/usr/local/etc/odbc.ini
. 安装的 ODBC 驱动程序将列在/usr/local/etc/odbcinst.ini
.
Try:
尝试:
usr$ find . -iname 'odbc*.ini'