【问题标题】:Unable to connect to firebird无法连接到火鸟
【发布时间】:2015-12-31 14:58:05
【问题描述】:

我几乎一行一行地关注这个docs

sudo add-apt-repository ppa:mapopa
sudo apt-get update
apt-cache search firebird2.5-*
sudo apt-get install firebird2.5-superclassic
sudo dpkg-reconfigure firebird2.5-superclassic

在这个阶段,我看到一个提示,要求我为SYSDBA 设置密码,因此我将其设置为root。然后我做剩下的:

sudo apt-get install firebird2.5-examples firebird2.5-dev 
cd /usr/share/doc/firebird2.5-examples/examples/empbuild/
sudo gunzip employee.fdb.gz
sudo chown firebird.firebird employee.fdb
sudo mv employee.fdb /var/lib/firebird/2.5/data/

最后:

$ isql-fb
SQL> connect "/var/lib/firebird/2.5/data/employee.fdb " user 'SYSDBA' password 'root';

因此,我收到以下错误消息:

Statement failed, SQLSTATE = HY000
operating system directive open failed
-Permission denied

这有什么问题?

【问题讨论】:

  • 第一个猜测:试试sudo isql-fb
  • 嗯。这是完全正确的。现在它起作用了。请对此作出回答,我会接受。

标签: ubuntu firebird


【解决方案1】:

您的数据库文件可能仅限于超级用户,因为您一直在使用sudo gunzip ..., sudo chown ..., sudo ...

  • 尝试sudo isql-fb 以超级用户身份工作(不是最佳选择)
  • 尝试sudo chmod 777 employee.fdb 使文件可供任何人读取/写入(也不是最佳选择)
  • 尝试sudo useradd -G {user} firebird 将自己添加到firebird 组和sudo chmod g+w employee.fdb 以确保employee.fdb 具有组写入权限(推荐)

【讨论】:

  • 另一个选项是确保 Firebird 服务器已启动并通过服务器连接。如果不指定主机名,则进行本地连接,需要足够的数据库用户权限,而通过 Firebird 服务器连接将使用数据库服务器的权限。
  • chmod 777 修复权限基本上是不正确的。您需要找出正确的权限,但它们永远不是 777。
【解决方案2】:

我遇到了同样的问题,所以我决定发布这个解决方案:

你必须做一些事情......首先,让我们看看安全的东西......

在文件/etc/firebird/2.5/firebird.conf

section: DatabaseAccess一定是这样的:

数据库访问限制/the/directory/you/want/to/put/the/database

现在,在文件/etc/firebird/2.5/aliases.conf 中添加别名和目录...

diryouwant = /the/directory/you/want/to/put/the/database/database.fdb

保存并重启firebird服务,如:

sudo service firebird-2.5"theversionyouhave" restart

您必须像这样更改目录所有者:

sudo chown firebird.firebird /the/directory/you/want/to/put/the/database

现在你可以毫无问题地使用flarerobin了……

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-02-06
    • 1970-01-01
    • 2011-03-26
    • 1970-01-01
    • 1970-01-01
    • 2012-03-01
    • 2021-11-22
    相关资源
    最近更新 更多