[GH-ISSUE #168] Missing documentation about using mysql #123

Closed
opened 2026-02-25 23:33:29 +03:00 by kerem · 2 comments
Owner

Originally created by @FunctionalHacker on GitHub (Sep 23, 2019).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/168

I have looked through the wiki and the help pages within shiori, and I can't find anything on how to use mysql. I can add this to the wiki myself if someone explains to me how I can use it.

Originally created by @FunctionalHacker on GitHub (Sep 23, 2019). Original GitHub issue: https://github.com/go-shiori/shiori/issues/168 I have looked through the wiki and the help pages within shiori, and I can't find anything on how to use mysql. I can add this to the wiki myself if someone explains to me how I can use it.
kerem closed this issue 2026-02-25 23:33:30 +03:00
Author
Owner

@RadhiFadlillah commented on GitHub (Sep 23, 2019):

@ReekyMarko sorry I forgot to add it to the wiki.

To use MySQL database, first set environment variable SHIORI_DBMS to mysql. After that specify the user, password database name (and if needed the address of database) via these environment variables :

  • SHIORI_MYSQL_USER
  • SHIORI_MYSQL_PASS
  • SHIORI_MYSQL_NAME
  • SHIORI_MYSQL_ADDRESS

In Linux this can be done in one command like this :

env SHIORI_DBMS=mysql \
    SHIORI_MYSQL_USER=radhi \
    SHIORI_MYSQL_PASS=password \
shiori serve

The related code for these actions can be seen here : github.com/go-shiori/shiori@df98c281d3/internal/cmd/root.go (L103-L118)

By the way, if you use SHIORI_MYSQL_ADDRESS, the address must be wrapped in the protocol e.g. SHIORI_MYSQL_ADDRESS=tcp(mysql_address_or_ip_here:3306). For more details check issue #156.

<!-- gh-comment-id:534005832 --> @RadhiFadlillah commented on GitHub (Sep 23, 2019): @ReekyMarko sorry I forgot to add it to the wiki. To use MySQL database, first set environment variable `SHIORI_DBMS` to `mysql`. After that specify the user, password database name (and if needed the address of database) via these environment variables : - `SHIORI_MYSQL_USER` - `SHIORI_MYSQL_PASS` - `SHIORI_MYSQL_NAME` - `SHIORI_MYSQL_ADDRESS` In Linux this can be done in one command like this : ``` env SHIORI_DBMS=mysql \ SHIORI_MYSQL_USER=radhi \ SHIORI_MYSQL_PASS=password \ shiori serve ``` The related code for these actions can be seen here : https://github.com/go-shiori/shiori/blob/df98c281d3d742f83e21d11b0eb0d50b6366173b/internal/cmd/root.go#L103-L118 By the way, if you use `SHIORI_MYSQL_ADDRESS`, the address must be wrapped in the protocol e.g. `SHIORI_MYSQL_ADDRESS=tcp(mysql_address_or_ip_here:3306)`. For more details check issue #156.
Author
Owner

@FunctionalHacker commented on GitHub (Sep 23, 2019):

Thanks a lot! I think this is already sufficient to add to the wiki.

EDIT: Apparently I can't access the markdown source for your comment, but if you click "edit" on the comment you could copy it to the wiki.

<!-- gh-comment-id:534006791 --> @FunctionalHacker commented on GitHub (Sep 23, 2019): Thanks a lot! I think this is already sufficient to add to the wiki. EDIT: Apparently I can't access the markdown source for your comment, but if you click "edit" on the comment you could copy it to the wiki.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#123
No description provided.