# Fixing invalid DB\_TYPE

**URL:** <https://forum.gitea.com/t/fixing-invalid-db-type/4402>\
**Category:** General\
**Created:** [January 13, 2022, 12:16am UTC](https://forum.gitea.com/t/fixing-invalid-db-type/4402 "2022-01-13T00:16:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gooberpatrol66](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/gooberpatrol66/32/577_2.png) [@Gooberpatrol66](https://forum.gitea.com/u/Gooberpatrol66)\
**Post date:** [January 13, 2022, 12:16am UTC](https://forum.gitea.com/t/fixing-invalid-db-type/4402/1 "2022-01-13T00:16:05Z")

</div>

I just discovered my gitea that I have used for years was set up with DB\_TYPE=mysql even though I use postgres. What is the best way to fix this? Is it safe to just change the setting?

---

<div class="post-metadata">

**Author:** ![lunny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lunny/32/4701_2.png) [@lunny](https://forum.gitea.com/u/lunny)\
**Post date:** [January 13, 2022, 4:40pm UTC](https://forum.gitea.com/t/fixing-invalid-db-type/4402/2 "2022-01-13T16:40:30Z")

</div>

Could you confirm that again? If that, your Gitea should not run successfully.

---

<div class="post-metadata">

**Author:** ![Gooberpatrol66](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/gooberpatrol66/32/577_2.png) [@Gooberpatrol66](https://forum.gitea.com/u/Gooberpatrol66)\
**Post date:** [January 13, 2022, 10:32pm UTC](https://forum.gitea.com/t/fixing-invalid-db-type/4402/3 "2022-01-13T22:32:22Z")

</div>

From /etc/gitea/app.ini:

`````auto
[database]
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ;
; ; Database to use. Either "mysql", "postgres", "mssql" or "sqlite3".
; ;
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ;
; ; MySQL Configuration
; ;
DB_TYPE = mysql
; can use socket e.g. /var/run/mysqld/mysqld.sock
HOST = 127.0.0.1:3306
NAME = gitea
USER = root
; PASSWD = ;Use PASSWD = `your password` for quoting if you use special characters in the password.
; SSL_MODE = false ; either "false" (default), "true", or "skip-verify"
; CHARSET = utf8mb4 ;either "utf8" or "utf8mb4", default is "utf8mb4".
; ;
; ; NOTICE: for "utf8mb4" you must use MySQL InnoDB > 5.6. Gitea is unable to check this.
; ;
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ;
; ; Postgres Configuration
; ;
; DB_TYPE = postgres
; HOST = 127.0.0.1:5432 ; can use socket e.g. /var/run/postgresql/
; NAME = gitea
; USER = root
; PASSWD =
; SCHEMA =
; SSL_MODE=disable ;either "disable" (default), "require", or "verify-full"
; ;
````Preformatted text`
`````

---

<div class="post-metadata">

**Author:** ![Gooberpatrol66](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/gooberpatrol66/32/577_2.png) [@Gooberpatrol66](https://forum.gitea.com/u/Gooberpatrol66)\
**Post date:** [January 16, 2022, 12:32am UTC](https://forum.gitea.com/t/fixing-invalid-db-type/4402/4 "2022-01-16T00:32:17Z")

</div>

Ah, ok, the systemd service was actually set to use a file besides /etc/gitea/app.ini. So the setting is valid.
