Fix mysql issues on first run (bug 1076972)