mysqldump --compact --no-create-info -h192.168.150.180 -uroot -p live pnlbus_stops | sed s/pnlbus_stops/bus_stops/g | mysql test
I am getting an error: ERROR 1062 (23000) at line 1: Duplicate entry 'AN' for key 1
This is because bus_stops table in the test DB has foreign key constraints. How do I truncate the bus_stops table from test database in a SINGLE STATEMENT before inserting from "live" DB?