0

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?

4

1 回答 1

2

mysqldump对于导入,您不需要

mysql -u root -pxxxxxx test < test2backup.sql
于 2015-06-20T17:24:35.553 回答