开发者

how to restore the database backup in test server database?

开发者 https://www.devze.com 2023-02-17 11:45 出处:网络
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 t

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
0

精彩评论

暂无评论...
验证码 换一张
取 消