解决MySQL导入文件问题(The selected file was generated by mysqldump and cannot be restored by this applicati)
2012-02-15 14:44
645 查看
正 文:
今天用MySQL Administrator工具想转移我的mysql数据库备份,从A主机商处备份下来beifen.sql文件,直接使用MySQL Administrator的Restore恢复功能时,工具提示:“The selected file was generated by mysqldump and cannot be restored by this application.” “ The selected file was generated by mysqldump and cannot be restored by this application.”这个错误的原因是备份的时候采用了 mysqldump 备份的方式,而用 MYSQLDUmp 导出的数据必须用mysql客户端(即 Mysql Command Line Client)来恢复! 方法如下:打开 Mysql Command Line Client ,输入登录 密码,选择要使用的数据库名,打入:
source d:\beifen.sql
即可。或者直接利用下面的命令:
mysql -u用户名 -p密码 数据库名 < 导入文件的路径
(比如我想向 auto数据库里恢复 1.sql,那么在source命令前打开 auto数据库即use auto,前提是你已经创建了空白的 auto 数据库),如下图:
将数据库成功导入到本地的mysql后,我们再次利用MySQL Administrator工具里的Backup备份功能,把刚才用Mysql Command Line Client导入的数据库做个备份,然后登录B主机商的远程MYSQL连接,利用MySQL Administrator的Restore直接恢复即可。
source d:\beifen.sql
即可。或者直接利用下面的命令:
mysql -u用户名 -p密码 数据库名 < 导入文件的路径
(比如我想向 auto数据库里恢复 1.sql,那么在source命令前打开 auto数据库即use auto,前提是你已经创建了空白的 auto 数据库),如下图:
将数据库成功导入到本地的mysql后,我们再次利用MySQL Administrator工具里的Backup备份功能,把刚才用Mysql Command Line Client导入的数据库做个备份,然后登录B主机商的远程MYSQL连接,利用MySQL Administrator的Restore直接恢复即可。
相关文章推荐
- 解决方案: the selected file is a solution file but was created by a newer version of this application and cannot be opened
- Invalid configuation file. File "**********" was created by a VMware product with more feature than this version of VMware Workstation and cannot be
- 解决使用maven的java web项目导入后出现的有关问题 -cannot be read or is not a valid ZIP file
- 如何解决打开xcode项目是遇到的“cannot be opened because the project file cannot be parsed.”问题?
- A class file was not written. The project may be inconsistent, if so try refreshing this project and
- A class file was not written. The project may be inconsistent, if so try refreshing this project and building it
- ORA-25152: TEMPFILE cannot be dropped at this time问题解决
- 解决:"MySQL error code 145 Table was marked as crashed and should be repaired"的问题
- struts2的“The file cannot be validated as the host "struts.apache.org" is currently unreachable"问题解决
- 解决java web项目导入后出现的有关问题 -cannot be read or is not a valid ZIP file
- A class file was not written. The project may be inconsistent, if so try refreshing this project and building it. eclipse提示错误
- The project file .csproj cannot be opened." The project type is not supported by this installation.
- 解决linux下sudo更改文件权限报错xxxis not in the sudoers file. This incident will be reported.
- Android项目导入出现The type java.lang.Object cannot be resolved.问题解决办法!!
- 关于"The dependency was added by the project system and cannot be removed" Error
- 解决使用maven的java web项目导入或新建添加pom配置后出现的有关问题 -cannot be read or is not a valid ZIP file
- LINQ to Entities does not recognize the method , and this method cannot be translated into a store expression 解决办法
- **** cannot be found. please check the location and try again 问题解决
- The MySQL server is running with the --secure-file-priv option so it cannot execute this statement解决
- Android项目导入出现The type java.lang.Object cannot be resolved.问题解决办法!! .