The database for Topology Manager is configured in
%TRIDION_HOME%\TopologyManager\web\Web.config, but you will likely need to decrypt this file to see the settings.
Run the following to decrypt the database settings (please backup the Topology Manager Web.config first):
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -pdf "database" "C:\Tridion\TopologyManager\web"
Change the path as appropriate for your environment, note it doesn't need the
Web.config at the end. The settings will then be visible in the database section in the web.config.
Once done, re-encrypt the Web.config afterwards. For the encryption command, see:
https://gateway.sdl.com/communityknowledge?articleName=000005881. It's not required to encrypt the settings again, but if you don't the database credentials will be just stored in plain text in that file.