how to restore the database backup in test server database?
i am using mysql database. i am trying to restore the database backup in test server. my backup file called steer_backup.sql is stored in /r开发者_高级运维oot. from the command prompt i am executing the command
mysqldump - u root -p steer < steer_backup.sql
and i will give the password on asking. but it does not restore the database. i am not sure whether i am doing some mistakes because this is my first time experience of committing the code to test server ... please help me .. Thanks in advance
mysqldump
is use to create a dump.
If you want to restore a sql backup, just use
mysql -u [user] -p [databaseName] < [file]
mysqldump
is for dumping. To import, just use mysql
.
mysql -uRoot -pPassword dbname < file.sql
精彩评论