运行Mysql批处理文件时出错 [英] Error when running Mysql batch file
问题描述
我的计算机上有一个.sql文件,位于C:\ Users \ Owner \ Documents \ file.sql (Windows Vista),仅在其中创建数据库和简单表. 在mysql的命令行中,我输入
I have a .sql file on my computer at C:\Users\Owner\Documents\file.sql (Windows Vista) that just creates a database and a simple table within. In mysql at the command line i enter
源C:\ Users \ Owner \ Documents \ newbie.sql;
source C:\Users\Owner\Documents\newbie.sql;
查询似乎可以正常运行,但是在向我显示成功创建的表之前,它会输出以下错误,这些错误似乎与我输入文件名的方式有关:
the query seems to work ok but just before it shows me the successfully created table it outputs the following errors that seem to be related to how i entered the file name:
ERROR:
Unknown command '\U'.
ERROR:
Unknown command '\O'.
ERROR:
Unknown command '\D'.
ERROR:
Unknown command '\n'.
请原谅新手错误...解决方法是什么?
Pardon the newbie error...whats the fix?
谢谢!
推荐答案
尝试在文件路径中使用正斜杠/
代替反斜杠\
:
Try using forward slash /
in place of back slash \
in file path:
C:/Users/Owner/Documents/newbie.sql
或将其置于双引号("
)
这篇关于运行Mysql批处理文件时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!