add debug option in MySQL and formatting