fixed sql config so that it actually works
fixed rebuild.php