[英]running mysql from windows 7 command line
I want to run a brief mysql script from the windows 7 command line. 我想从Windows 7命令行运行一个简短的mysql脚本。 The command line text I am using looks like:
我正在使用的命令行文本如下所示:
C:\> C:\my path\mysql\bin\mysqld-nt --init-file=C:\\mysql-script.txt
The problem is that I am getting the following error message in the windows 7 command line: 问题是我在Windows 7命令行中收到以下错误消息:
C:\my is not recognized as an internal or external command, operable program or batch file
I have researched this online, but the solutions center around setting a new windows environmental variable. 我已经在网上对此进行了研究,但是解决方案的重点是设置新的Windows环境变量。 I do not think I should create an environmental variable called 'my'.
我认为我不应该创建一个名为“ my”的环境变量。 So what else can I do in order to run mysqld-nt from the windows 7 command line?
那么,为了从Windows 7命令行运行mysqld-nt,我还能做什么?
It is important that MySQL not be running when I do this, so I need to call it from the windows 7 command line and not use the MySQL command line client. 执行此操作时,不要运行MySQL非常重要,因此我需要从Windows 7命令行调用它,而不要使用MySQL命令行客户端。
You have a space between "my" and "path". 您在“我的”和“路径”之间有一个空格。
Try: 尝试:
"C:\my path\mysql\bin\mysqld-nt" --init-file=C:\\mysql-script.txt
You need the quotes to wrap any directory structure containing a space. 您需要用引号将所有包含空格的目录结构包裹起来。
The answer is right in the error: 答案正确无误:
C:\\my is not recognized as an internal or external command, operable program or batch file
C:\\ my无法识别为内部或外部命令,可操作程序或批处理文件
What is C:\\my path
? 什么是
C:\\my path
? Is that really your file system path? 那真的是您的文件系统路径吗?
If so, your command would be; 如果是这样,您的命令将是: note the quotes to keep "my path" together:
请注意引号,以使“我的道路”保持一致:
"C:\my path\mysql\bin\mysqld-nt" --init-file=C:\\mysql-script.txt
But more likely, my path
should be the actual file system path on your Windows 7 install. 但更可能的是,
my path
应该是Windows 7安装上的实际文件系统路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.