开发者

Firebird error "username and password are not defined" with Delphi application

I have an application made with Delphi 2006 and Firebird 2.5. For connection a use Interbase components from Delphi. I setting up in design time a TIBDatabase with username, password tc, and work ok, but when i want to run application in another pc (first i install Firebird 2.5 on it), i received t开发者_运维问答his error:

Statement failed, SQLSTATE = 28000

Your user name and password are not defined. Ask your database administrator to set up a Firebird login.

What is this? How can I resolve that?


The message clearly states the username and password you're using to connect at design time in your development machine are not valid to the database server you're trying to connect on the other machine (let's call it production). From your message it seems it is not the same server you connect to at design time.

I suggest you to test this issue with ease to put the LoginPrompt property to true on the TIBDatabase component to allow it to ask the user for propper credentials before connecting. You will be able to connect using any valid username/password combination for that server. To be sure the combination are valid, try to connect using the isql command line tool, for example the command

c:\test>isql test.fdb -u sysdba -p masterkey

will connect to c:\test\test.fdb using default username and password. (the firebird root directory must be in the path environment variable for this to work)

Also, you can use the gsec command line tool to adjust the password for this engine or you can provide the create users and change passwords on that production machine before trying to connect to it.

On Windows, firebird default sysdba password is masterkey.


The solution that finally worked for me on windows was starting cmd.exe as administrator and running "C:\Program Files (x86)\Firebird\Firebird_3_0\gsec.exe" -user sysdba -password masterkey -mo sysdba -pw masterkey


This error is because the credentials for Firebird db is simply not stored in the database file. It's stored in the configuration file on the Firebird Server. If you copy over the DB file, and not the password -- you will have a different password.

On Ubuntu machines you can find out the password and username in the file, /etc/firebird/<version>/SYSDBA.password

It'll look something like,

ISC_USER=sysdba
ISC_PASSWORD="password"

Use those credentials to connect to the database file.


At 'isql-fb' from linux terminal and after the 'CONNECT' on database: - I solved after delete(drop) and recreate the 'SYSDBA' user.

Observation: I had problems with file and folder permission at '/tmp/firebird' and I needed to use 'sudo' or root to open 'isql-fb'

Thanks.


I once got this error trying to connect to a Firebird 3.0.3 database using the Firebird 2.5 client libraries. I just forgot to update the client libraries to 3.0.3. Maybe this will help someone.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜