Not tested, but code like the following in your config.php should do the trick:
PHP Code:
// Define array of username/password combo's
$my_sql_configs = array(
0 => array('user' => 'user1', 'pass' => 'pass1')
, 1 => array('user' => 'user2', 'pass' => 'pass2')
);
// Randomly select 1
$selecteduser = array_rand($my_sql_configs);
// Assign selected user to config
$config['MasterServer']['username'] = $my_sql_configs[$selecteduser]['user'];
$config['MasterServer']['password'] = $my_sql_configs[$selecteduser]['pass'];