add usage, remove unused vars, support --mysql