Changing default database/dbms for system and user database in bitnami dreamfactory

Hi everybody!

I’m currently using bitnami dreamfactory 2.3.0-4. At present I am trying to use PostgreSQL as a system and dreamfactory user database. I have created a database and a user solely for this purpose in PostgreSQL. And now I’m able to connect to database via that user in PostgreSQL.

NOW the problem is that when I start apache server in bitnami dreamfactory ( mongodb and mariadb are in stopped state ), and open http://localhost:8080 then I get the following error in browser.

       `Undefined table: 7 ERROR:  relation app does not exist`

The screenshot is attached.

One thing I wish to know that do I have to create a table for dreamfactory system and users ??

I have read all previous related posts in this forums, and they all mention that switching to another system database takes only changing the htdocs/.env file in dreamfactory to set the desired dbms for system database. Is something more to be done ??

Oops! Sorry my bad. It is a skip on my part. I forgot to run $ php artisan cache:clear before php artisan dreamfactory:setup. Now everything runs fine.

To summarize:

Stop your webserver/apache to perform below steps.
The dbms(in which dreamfactory system database will reside) must be running from here onwards.

First you need to create a database user and a database in the dbms to be used as dreamfactory system database.

Second, to change default database for dreamfactory you need to edit {bitnami-install}/apps/dreamfactory/htdocs/.env file.

Third, after changing the default database in {bitnami-install}/apps/dreamfactory/htdocs/.env, in your shell navigate to the dreamfactory root folder ( {bitnami-install}/apps/dreamfactory/htdocs/ ) and run below commands in order:
$ php artisan config:clear
$ php artisan cache:clear
$ php artisan dreamfactory:setup
//Answer the on screen prompts

Restart Apache

NOTE: No need to create any tables/relations manually. They will be created automatically when you run $ php artisan dreamfactory:setup . This cmd will ask you to create first admin user for dreamfactory instance.

Thanks.

1 Like

Hello @abhinavg, thanks for sharing!

  • @AlexBowen