It depends on your database. Trying to protect a resource where the resource is physically compromised by a bad actor is a hard problem because the bad actor has access to all resources: disk, network and memory. I'd be tempted to threat model the application and consider how you can mitigate the bad admin. If you don't trust the admin then there you do have a problem, but it might be that you can store credentials in an external source such as a Hardware Security Module. There is a whole industry around privileged account management where companies such as Cyberark claim that they can control access to your database. These products typically record privileged account access: they won't stop an authorised person going on a frolic of their own.
For the specific question of how to prevent someone with full access to the environment from reading a specific file: it's not possible. You could try to set access permissions ownership etc but you can't stop someone who has the access from getting to it. Putting the data into an HSM to which the actor does not have access will mitigate but you need to ensure that your database can talk to the HSM.
To really prevent someone who has legitimate root/admin to the system I think you will need to split up the systems to implement segregation of duties, then change your database authentication model: one admin looks after the user credentials store while the other admin looks after the database.
You could require every individual user to have their own login to the database. The web app then performs the login, assuming the admin can't hook into the web app (which they can). Perhaps not scalable, but possible.
For MS SQL you can use Windows authentication mode. doc This uses the windows authentication to the domain via kerberos. Your admin won't be able to get the credentials. You could of course have a service account and put that service account in a domain that your DBA does not have access to
For MySQL you can use LDAP via the pluggable authentication link
For Oracle take a look at Oracle Key Manager link