# Missing database in login

**URL:** https://discuss.tryton.org/t/missing-database-in-login/8579
**Category:** System Administrator
**Created:** [May 9, 2025, 5:58pm UTC](https://discuss.tryton.org/t/missing-database-in-login/8579 "2025-05-09T17:58:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rfink](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rfink](https://discuss.tryton.org/u/rfink)
#### Post date: [May 9, 2025, 5:58pm UTC](https://discuss.tryton.org/t/missing-database-in-login/8579/1 "2025-05-09T17:58:02Z")

</div>

Cedric, thanks for your reply. I downloaded the wrong sao, now it runs the web interface without there “Version Mismatch”.

However, I am failing to connect with the database. The database I created does not appear in the selection window.

I have been trying to diagnose with Google Gemini and have narrowed it down to the trytond seems to be looking for an sql lite database.

Here is the latest from Google Gemini:

**Despite all this, it’s still trying to connect to a SQLite database!** This means that even though your `tryton.cfg` is being loaded, the PostgreSQL URI within it is not being recognized or used by the database connection logic in `trytond-admin`.

This is a very strange situation. Here are a few more ideas to try and understand why the URI might be ignored:

1. **Check `trytond-admin` for Forced SQLite:** Carefully examine the `trytond-admin` script again for any code that might be explicitly setting the database backend to SQLite or constructing a SQLite URI regardless of the configuration file. Look for imports or usage of `sqlite.database`.
2. **Examine `trytond/config.py` (within your virtual environment):** The `trytond.config` module is responsible for loading the configuration. There might be a specific way it handles URIs or a potential bug. You can try looking at the source code of this module (it will be in `C:\Tryton Virtual Environment\.venv\Lib\site-packages\trytond\config.py`) to see if there’s any logic that might explain this behavior.
3. **Try Setting Database Parameters Individually in `tryton.cfg` (as a Test):** Instead of using the `uri` setting, try setting the `host`, `port`, `user`, `password`, and `database` parameters individually in the `[database]` section of your `tryton.cfg` file. Comment out the `uri` line. This might force Tryton to use the traditional parameter-based connection method instead of relying on URI parsing.

```auto
[database]
# uri = postgresql://postgres:post_pass@localhost:5432/Trytond_db
host = localhost
port = 5432
user = postgres
password = post_pass
database = Trytond_db
list_database = True

```

Then, run the `trytond-admin` command again.

This is a very puzzling issue, as it seems the configuration file is being loaded, but the URI within it is not being used for the database connection in `trytond-admin`. Trying the individual parameters might help us understand if the problem is specifically with URI parsing within this tool.

Any help would be much appreciated.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [May 9, 2025, 9:37pm UTC](https://discuss.tryton.org/t/missing-database-in-login/8579/2 "2025-05-09T21:37:12Z")

</div>

`trytond` does not use anything else than the `uri` value.  
The `uri` should only contains the configuration to connect to the database server but not any database name.

Now to be able to help, we need to have your exact setup and command lines you run.

---

<div class="post-metadata">

### Author: ![htgoebel](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/htgoebel/32/1256_2.png) [@htgoebel](https://discuss.tryton.org/u/htgoebel)
#### Post date: [May 13, 2025, 3:46pm UTC](https://discuss.tryton.org/t/missing-database-in-login/8579/3 "2025-05-13T15:46:24Z")

</div>

Since you are adding random entries to the config file, I wonder whether you actually read [Configuration file — Tryton server](https://docs.tryton.org/latest/server/topics/configuration.html#database)
