Quantcast
Channel: Ignite Realtime: Message List
Viewing all articles
Browse latest Browse all 11413

Re: Is the import schema step even necessary anymore?

$
0
0

OK I think I finally got everything working, but again, in case any other idiots find themselves in my same situation, I'm going to answer my own questions:

 

1. Importing the database schema IS necessary. 

2. I believe that on my initial setup of openfire, I was using a 24-character password for my DB login, but the webconfig only accepts 20-characters max.  Somehow, it was still letting me continue past the DB setup page on the web config, even though the passwords did not match (the webconfig clearly still needs more work).  I didn't realize that the webconfig was truncating my password because I was copy-pasting.  This defect in the webconfig was hiding my problem with the schema.

3. On the second go-round, using a 20-character DB password, the webconfig was working as intended and giving me the, valid, error that my DB schema was not imported.

4. However, the DB schema WAS imported.  So what was wrong?  Well you'd have to reference my other thread here:  I'm dying trying to import the postgresql schema.

 

So basically, I was able to import the schema as my main user on my Ubuntu box.  I also created the database as that same user.  Let's call that user UbuntuMainUser.  At the same time, I was telling openfire to login as a different user OpenfireDBUser.  Now, I have granted both UbuntuMainUser and OpenfireDBUser ALL PRIVILEGES to the postgresql database, but apparently that is not enough for the webconfig.  Since I had both created the database AND imported the schema using UbuntuMainUser, UbuntuMainUser was listed as owner for both the database AND all of its tables and webconfig didnt like this mismatch.  I had to issue the following commands in psql to fix the problem:

 

ALTER DATABASE openfireDB OWNER TO OpenfireDBUser;

\c openfireDB;

REASSIGN OWNED BY UbuntuMainUser TO OpenfireDBUser;

 

To explain what is happening here: the first line changes the owner of the database, but DOES NOT affect the tables or any other database objects.  The second line connects to the openfireDB database.  Once connected, the last line reassigns ownership of ALL tables and database objects.


Viewing all articles
Browse latest Browse all 11413

Trending Articles