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

**URL:** <https://community.dreamfactory.com/t/changing-default-database-dbms-for-system-and-user-database-in-bitnami-dreamfactory/3302>\
**Category:** uncategorized\
**Created:** [October 6, 2016, 12:04pm UTC](https://community.dreamfactory.com/t/changing-default-database-dbms-for-system-and-user-database-in-bitnami-dreamfactory/3302 "2016-10-06T12:04:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhinavg](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@abhinavg](https://community.dreamfactory.com/u/abhinavg)\
**Post date:** [October 6, 2016, 12:04pm UTC](https://community.dreamfactory.com/t/changing-default-database-dbms-for-system-and-user-database-in-bitnami-dreamfactory/3302/1 "2016-10-06T12:04:56Z")

</div>

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](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 ??

 ![](https://canada1.discourse-cdn.com/flex035/uploads/dreamfactory/original/1X/4e70d65b580a2fe76687f7a04cc71dad1e8f778a.png)

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 ??

---

<div class="post-metadata">

**Author:** ![abhinavg](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@abhinavg](https://community.dreamfactory.com/u/abhinavg)\
**Post date:** [October 6, 2016, 2:50pm UTC](https://community.dreamfactory.com/t/changing-default-database-dbms-for-system-and-user-database-in-bitnami-dreamfactory/3302/2 "2016-10-06T14:50:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![DFCommunityManager](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/dfcommunitymanager/32/887_2.png) [@DFCommunityManager](https://community.dreamfactory.com/u/DFCommunityManager)\
**Post date:** [October 7, 2016, 8:35pm UTC](https://community.dreamfactory.com/t/changing-default-database-dbms-for-system-and-user-database-in-bitnami-dreamfactory/3302/3 "2016-10-07T20:35:35Z")

</div>

Hello @abhinavg, thanks for sharing!

- @AlexBowen
