You could always keep the config.php settings and dureing the middle of the app make it switch to the new sql settings makeing the first sql settings dummy settings trying to fool the hacker that those are the real settings...

Or make a series of sql connections to switch them... Its a hard concept with php