Closed khasburrahman closed 5 years ago
how can I connect to existing database?
I have the database file in ./data
with the name MyData.GDB
I already mount the data to firebird/data
and the database name ex: MyData.GDB
this is my docker-compose file for firebird
firebirddb:
image: jacobalberty/firebird:2.5-sc
networks:
- mynetwork
volumes:
- ./data:/firebird/data
environment:
- ISC_PASSWORD=random123
- FIREBIRD_USER=guest
- FIREBIRD_PASSWORD=guest
- FIREBIRD_DATABASE=MyData.GDB
but when I connect with my nodeJS application it returns an error Error: Your user name and password are not defined. Ask your database administrator to set up a Firebird login
dbOptions = {
host: 'firebirddb',
port: '3050',
database: '/firebird/data/MyData.GDB',
user: 'guest',
password: 'guest'
}
return Firebird.attach(dbOptions, (err, db) => {
if (err) throw err;
// it stops here....
}
The database file can be oppened using tool like flamerobin, so I'm certain that the file isn't corrupted
..and some random detail: It works previously, but when I upload it to remote, it didn't. Then I modify the compose file, trying to make it work in the remote, but I had it broken for both. Then I reverted it to the case when it work locally, but no, it stopped working.. maybe I forgot something
It turns out the the database file is corrupted somehow, the md5sum didn't match I tried to upload it several times more, and it worked.
but didn't quite work like I expected, none of the tables that been created appears on the database. but maybe that's another issue not related to this, I'm closing this. thank you!
Sorry I accidentally pressed enter when entering the title, and.. I thought the comment button is to edit my post