Skip to content

Commit 0f476b5

Browse files
feat: Add MySQL to store configuration and usage data
1 parent c01a7a5 commit 0f476b5

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

wren-ui/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,32 @@ export DB_TYPE=pg
2727
export PG_URL=postgres://user:password@localhost:5432/dbname
2828
```
2929
- `PG_URL` is the connection string of your postgres database.
30+
`PG_URL` is the connection string of your postgres database.
31+
32+
To use MySQL or MariaDB as the database, set `DB_TYPE=mysql` and provide the connection settings via environment variables below. (The `mysql2` driver used by Wren UI supports both MySQL and MariaDB.)
33+
34+
```bash
35+
# windows
36+
SET DB_TYPE=mysql
37+
SET MYSQL_HOST=localhost
38+
SET MYSQL_PORT=3306
39+
SET MYSQL_USER=root
40+
SET MYSQL_PASSWORD=your_password
41+
SET MYSQL_DB=your_database
42+
43+
# linux or mac
44+
export DB_TYPE=mysql
45+
export MYSQL_HOST=localhost
46+
export MYSQL_PORT=3306
47+
export MYSQL_USER=root
48+
export MYSQL_PASSWORD=your_password
49+
export MYSQL_DB=your_database
50+
```
51+
52+
Notes:
53+
- Ensure the user has sufficient privileges to create tables and run migrations.
54+
- For MariaDB, the same variables apply; just point them to your MariaDB instance.
55+
- If you use a non-default port, adjust `MYSQL_PORT` accordingly.
3056

3157
To switch back to using SQLite, you can reassign the `DB_TYPE` to `sqlite`.
3258
```

0 commit comments

Comments
 (0)