server: Add test query to mysql code.  Add rebuild flag to serverbuild script.