This is a legitimate database that backs Photos content on macOS (and probably tvOS, iOS, iPadOS).
It's inside the "Package" that is your Photos Library and you can have more than one Library with Photos, so the name can vary.
If you look inside your Pictures folder (~/Pictures) you can use the Finder Go menu to go to this location once you know what your library is named. For me it's "Photos Library.photoslibrary"
The real question comes next. Why does this sync process not work and why would it not tell you to quit the Photos app or grant permissions. By default, macOS will not let any program access photos, contacts and more and the program has to "ask" to get permission.
Above you can see the "unix" permissions for the files in question.
The where is this is easy - the what's really broken? is harder to guess. Also - we might need you to ask a follow on question that explains where your research led if the idea of a home folder / permissions granted or unix permissions isn't relevant or helpful - I would rather not assume you're an expert or a beginner without a little more context.
In summary - you may not even want to sync the Photos library since not all the photos in there might be stored in a way the sync tool expects. Can you just store your photos in a folder / export them or do you intend this to be a two way process that makes both databases stay in sync no matter how a photo arrives in the Photos app?