Hey, you have several options, here are a few:
First option:
Separate database, web and the game server itself, having 3 possible instances. For this case you must take into account that the "services" must know each other, that is, web and server must be able to call the database, usually...