Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ubuntu 无法连接到firebird_Ubuntu_Firebird - Fatal编程技术网

Ubuntu 无法连接到firebird

Ubuntu 无法连接到firebird,ubuntu,firebird,Ubuntu,Firebird,我几乎一行一行地遵循这一点: 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

我几乎一行一行地遵循这一点:

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 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具有组写入权限(推荐)

我也有同样的问题,所以我决定发布以下解决方案:

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

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

部分:数据库访问
必须如下所示:

数据库访问限制
/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服务firebird-2.5“theversionyouhave”重新启动

必须按如下方式更改目录所有者:

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


现在,您可以毫无困难地使用flamerobin…

第一个猜测:试试
sudo isql fb
Hm。这绝对正确。现在它起作用了。请对此作出回答,我将接受。另一个选项是确保Firebird服务器已启动并通过服务器连接。如果不指定主机名,则会建立本地连接,这需要对数据库拥有足够的用户权限,而通过Firebird服务器连接将使用数据库服务器的权限。使用
chmod 777
修复权限基本上是不正确的。您需要找出正确的权限,但它们永远不会是777。