MySQLdump is executing, but not actually working

72 views Asked by At

I'm trying to back up and restore a MySQL database using mysqldump. With my commands I am making a back up file and then restoring that file, but where I'm restoring the database shows no change.

This creates the backup folder in the same directory as the mysqldump.exe file:

In the windows cmd: mysqldump -u root -pxxxxxx test2 > test2backup.sql

Restoring with that file: mysqldump -u root -pxxxxxx test < test2backup.sql

test is an empty database. test2 is a database with tables and data. Running this should fill test with test2's data using the test2backup.sql file, should it not?

1

There are 1 answers

0
Abhik Chakraborty On BEST ANSWER

For importing you do not need mysqldump rather

mysql -u root -pxxxxxx test < test2backup.sql