MySql - 尝试导入数据库,收到消息“系统找不到指定的文件." [英] MySql - trying to import a database, get message 'The system cannot find the file specified.'

查看:46
本文介绍了MySql - 尝试导入数据库,收到消息“系统找不到指定的文件."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了 MySql 4.1(因为它在我的服务器上运行),我得到了一个数据库转储文件.它大约是 4.6 GB.

I installed MySql 4.1(because that what is running on my server), I got a file that is a dump of my database. It is about 4.6 GB.

我将该文件放在与 MySql.exe 所在的位置相同的位置 C:\Program Files\MySQL\MySQL Server 4.1\bin

I put that file in same location as MySql.exe lives C:\Program Files\MySQL\MySQL Server 4.1\bin

然后我去命令行输入:

mysql -h localhost -u root -p [database name] < mysqlDump.sql

我收到消息'系统找不到指定的文件.'

它指的是什么文件?mysqlDump.sql?

What file is it referring to? The mysqlDump.sql?

即使我指定了 mySqlDump.sql 文件的完整路径,我也会收到相同的消息.

Even when I specify the full path to the mySqlDump.sql file, I get the same message.

mysql -h localhost -u root -p [database name] < C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqlDump.sql

我在 Windows7 上运行 MySql 4.1

I'm running MySql 4.1 on Windows7

update 发现了我的错误.我的文件夹隐藏了文件扩展名.不知何故,当我将文件保存在我的机器上时,我给了它一个额外的 .sql 扩展名.因此该文件的名称为 mysqlDump.sql.sql

update found out my mistake. My folder was hiding file extensions. Somehow when I saved the file on my machine I gave it an extra .sql extension. So the file had a name of mysqlDump.sql.sql

推荐答案

当您开始输入 mysqlDump... 时使用 TAB 键以确保您的文件在那里.命令行中的 Tab 键将完成文件名与否.您还应该检查该文件的权限.也许它是从其他用户帐户生成的,而您没有阅读权限.

Use TAB key when you are starting typing mysqlDump... to ensure that your file is there. Tab key in command line will complete filename or not. Also you should check permissions on that file. Maybe its generated from other user account and you have no read privileges.

这篇关于MySql - 尝试导入数据库,收到消息“系统找不到指定的文件."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆