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
以确保employee.fdb具有组写入权限(推荐)sudo chmod G+w 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。