【问题标题】:Unable to connect from Unix box to Access database on Windows server无法从 Unix 机器连接到 Windows 服务器上的 Access 数据库
【发布时间】:2017-09-25 09:00:30
【问题描述】:

我看到了戈德在

中提到的答案

Unable to connect to a database on a shared drive - UCanAccess.

我能够将我的数据库从 Windows 访问到我的 Access 数据库文件所在的 Windows Server。

但是当我在 Unix 上部署相同的代码时,我无法访问我的数据库。我使用的网址与 Gord 建议的网址相同。

我的网址是:

datasource.crr.url=jdbc:ucanaccess://////abc.dch.com\\der\\Share\\SongUnflaggedTest\\Songs\ Unflagged.accdb;Skipindexes=true;memory=true.

【问题讨论】:

    标签: java ms-access jdbc ucanaccess


    【解决方案1】:

    与 Windows 不同,大多数 Linux/Unix 环境无法通过简单地使用其 UNC 路径直接访问共享文件夹中的文件,例如,

    \\server\share\folder\file.ext
    

    相反,我们通常必须告诉 Linux/Unix 机器到 mount 本地文件系统上某个点的共享(有点像在 Windows 中分配驱动器号),然后将其用作起点。

    例如,如果我们mount分享

    \\server\share
    

    到本地文件系统上名为

    的挂载点
    /mnt/servershare
    

    然后我们可以使用路径访问文件

    /mnt/servershare/folder/file.ext
    

    有关示例,请参阅 this Ask Ubuntu question。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多