繁体   English   中英

如何从其大转储文件本地还原数据库

[英]How to restore locally a database from its big dump file

OS X 10.6.8 MAMP 3.0.5转储文件重600 MB,所以我不使用phpmyadmin,而是使用命令行。

原始DB:平滑
恢复原始数据库的空数据库:smoothitbis
原始数据库转储文件:smoothit-16-05-2014.sql

我在OS X Shell下尝试过:

/applications/MAMP/library/bin/mysql -u root -p smoothitbis < /Applications/MAMP/db/mysql/recuperationsmoothit/smoothit-16-05-2014.sql

在mysql shell下

mysql -uroot -proot smoothitbis < /Applications/MAMP/db/mysql/recuperationsmoothit/smoothit-16-05-2014.sql

没有创建一个空数据库

mysql -uroot -proot < /Applications/MAMP/db/mysql/recuperationsmoothit/smoothit-16-05-2014.sql

每次,答案类似于现有数据库中新表的输入。

首先检查转储文件是否包含创建数据库语法并使用数据库查询? 然后采取相应的措施,无论是添加数据库名称还是创建自己的数据库名称。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM