more database fixes. Bootstrapping almost works with new mysql