Multiple localhost config settings
Here's a multi environment config guide that I think will accomplish all you need. 

It allows for environment specific DB connection parameters, but can also set filepaths, that why you can keep your assets path relative in regards to the path set in the environment. 

It's an extension to the multi-environment setup as discussed here.

If you have any questions after reading that, feel free to ask.