How to save database connection easy and safe?
Well, there is the encrypt module which can encrypt your data. Be sure to use the 7.x-2.x branch.

And yes, store the key somewhere on the filesystem that is not easily accessed and it should be hard for an attacker who has db access to be able to decrypt the info.

Just be sure that there's no way to execute php via the Drupal interface. A module like paranoia can help in that.