I have 2 MySQL servers. Server A is up to date. I run the following on Server A:

mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql

on Server B I run:

mysql -u root -p[root_password] [database_name] < dumpfilename.sql

after I run the mysql import command on Server B - I still see old entries on that server. what am I missing? I want both servers to have an Identical DB. (after I export and import the file from Server A to Server B). Thanks, Dotan.

2 Answers 2


Add --add-drop-table to your mysqldump command. This will cause the tables on the destination to be recreated from scratch with whatever data is in your dump.


You can try some GUI clients like MySQL workbench or SQLyog. Where you can create a dump with drop if exists or add-drop-table in the dump what you have already generated.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .