开发者

move magento db to another server

I have a Magento website, from the cpanel I created db backup and saved it to my pc, but I don't know how to import it to my new ma开发者_如何学Cgento website.

P.S: the old hosting is now expired and I have only this db backup.


I've found exporting the Magento database through cpanel/phpmyadmin tends to have more problems with key conflicts than exporting through the command line. But since your hosting is expired we'll have to make do with what you have.

You'll need to edit the sql file inside the .sql.gz file (extract with any zipping program).

Add this line at the start of the sql file

SET FOREIGN_KEY_CHECKS = 0;

And then add

SET FOREIGN_KEY_CHECKS = 1; 

Then try importing into an empty db again.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜