本文主要是介绍解决MySQL导入文件问题(The selected file was generated by mysqldump and cannot be restored by this applicati),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
正 文:
今天用
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导入文件问题(The selected file was generated by mysqldump and cannot be restored by this applicati)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!