Error when running Mysql batch file

喜夏-厌秋 提交于 2019-12-22 04:45:11

问题


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

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?

Thanks!


回答1:


Try using forward slash / in place of back slash \ in file path:

C:/Users/Owner/Documents/newbie.sql

or put it between double quotes (")



来源:https://stackoverflow.com/questions/5905523/error-when-running-mysql-batch-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!