daemon-rewrite/mysql: Move database creation/rotation from daemon to MySQLAPI