Fixed bugs in mysql migration command and added method for inserting to mysql using given connection