[GH-ISSUE #75] Documentation : MariaDB user creation and privileges grant #21

Closed
opened 2026-03-02 16:47:05 +03:00 by kerem · 2 comments
Owner

Originally created by @teimahu on GitHub (Apr 29, 2021).
Original GitHub issue: https://github.com/photoprism/photoprism-docs/issues/75

Originally assigned to: @lastzero on GitHub.

Hi,

I think there is a mistake with the SQL command for granting rights to the newly created user in file : docs/getting-started/advanced/databases.md

On my setup (MariaDB 10.4.18), I had to change the grant line from:
GRANT ALL PRIVILEGES ON photoprism.* to 'photoprism'@'%';

To:
GRANT ALL PRIVILEGES ON photoprism.* to 'photoprism'@'%' IDENTIFIED BY 'insecure';

And I would end with a:
FLUSH PRIVILEGES;

So that new grant is taken into account.

Thanks,
Mathieu

Originally created by @teimahu on GitHub (Apr 29, 2021). Original GitHub issue: https://github.com/photoprism/photoprism-docs/issues/75 Originally assigned to: @lastzero on GitHub. Hi, I think there is a mistake with the SQL command for granting rights to the newly created user in file : docs/getting-started/advanced/databases.md On my setup (MariaDB 10.4.18), I had to change the grant line from: GRANT ALL PRIVILEGES ON photoprism.* to 'photoprism'@'%'; To: GRANT ALL PRIVILEGES ON photoprism.* to 'photoprism'@'%' IDENTIFIED BY 'insecure'; And I would end with a: FLUSH PRIVILEGES; So that new grant is taken into account. Thanks, Mathieu
kerem 2026-03-02 16:47:05 +03:00
Author
Owner

@lastzero commented on GitHub (Apr 30, 2021):

Updated our docs. Does this work for you?

CREATE USER 'photoprism'@'%' IDENTIFIED BY 'insecure';
GRANT ALL PRIVILEGES ON photoprism.* to 'photoprism'@'%';
FLUSH PRIVILEGES;

Setting the password again with GRANT ALL should not be needed IMO.

<!-- gh-comment-id:829976976 --> @lastzero commented on GitHub (Apr 30, 2021): Updated our docs. Does this work for you? ```sql CREATE USER 'photoprism'@'%' IDENTIFIED BY 'insecure'; GRANT ALL PRIVILEGES ON photoprism.* to 'photoprism'@'%'; FLUSH PRIVILEGES; ``` Setting the password again with `GRANT ALL` should not be needed IMO.
Author
Owner

@teimahu commented on GitHub (Apr 30, 2021):

Yes you are right, I found tutorials with and without it yesterday.
But the MariaDB documentation clearly states that setting the password in GRANT ALL is optionnal,
I just tested again today creating a new user on my setup and of course, the "identified by" statement is not mandatory, I surely made a mistake yesterday.
Sorry I should have double checked before creating an issue.

<!-- gh-comment-id:830414713 --> @teimahu commented on GitHub (Apr 30, 2021): Yes you are right, I found tutorials with and without it yesterday. But the MariaDB documentation clearly states that setting the password in GRANT ALL is optionnal, I just tested again today creating a new user on my setup and of course, the "identified by" statement is not mandatory, I surely made a mistake yesterday. Sorry I should have double checked before creating an issue.
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/photoprism-docs#21
No description provided.