Subject Re: [firebird-support] Setting up a Firebird database on Centos Linux
Author Helen Borrie
At 01:52 PM 24/08/2009, you wrote:
>Hi, thanks for reading - Please see if you can try help me, I've spent all night on getting this far...
>
>The short version:
> After uploading my database to my linux server, my client cannot connect saying that my password has not been defined. So I tried to create the database and then restore to it, but cannot seem to create the database - I must be doing something wrong.

;-)


>The detail version:
>I've successfully installed the latest firebird on Centos in a Virtual Private Server Environment.
>Upon installation it automatically changed my SYSDBA password to something that's NOT 'masterkey'.

Actually, on Linux, the script generates a password and stores it in the Firebird root directory in a plain text file called SYSDBA.password. This is the password that is installed in security2.fds for the SYSDBA user at install time. You **REALLY** need to read the installation and migration guide!

>I have built an existing database on my Windows XP machine that I need to move to the server.

Use gbak -b to make a backup on the Windows server, copy that file to a suitable location on the Linux machine and use gbak -c to restore it there.

>My client can connect to the 'demo' database on the server.
>I first tried the easy route of uploading the file straight to the server, but when I try to connect using my client it says:
>"Your user name and password are not defined. Ask your database administrator to set up a Firebird login.. Error Code: -902." I have tried using both 'masterkey' and the new password.

If both the Windows and the Linux hardware are the same, e.g. x86, then chance are copying the database will "work". But first you need to get things sorted w.r.t. the SYSDBA password. You *can* change it to 'masterke' if you want to. There is a script to enable that. You can find all about it by reading that I&M guide.

>I then tried to create a database in linux so that I could 'restore' the XP database but I must be too stupid. Here's what I'm doing:
>1. Using an SSH client session I connect to my linux server.
>2. I navigate to /opt/firebird/bin
>3. I type ./isql
>4. Here's the transcript for my isql session:
>Use CONNECT or CREATE DATABASE to specify a databaseSQL
>SQL> create database 'localhost:/opt/firebird/databases/remote.fdb -u SYSDBA -p pexample
>CON> user 'SYSDBA' password 'masterkey';#
>CON> user 'SYSDBA' password 'masterkey'
>CON> quit
>CON> ?
>[Cannot seem to leave 'CON']

Well, several things are wrong here...first, FYI, the CON> prompt is for continuation of a statement. A statement inside isql must have a terminator. If you press Enter at the end of an unterminated statement, the CON> prompt comes up for you to add more. The default terminator is a semicolon.

Next, until 'masterke' is the SYSDBA password, "password 'masterkey' " won't work. Either use the created one, or change the password.

In case you are a total newbie on POSIX platforms, pay close attention in the I&M guide to the notes about file permissions.

You might also do yourself a favour by revisiting the Quick Start Guide....

./heLen