8

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 Answer 1

16

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

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

or put it between double quotes (")

Sign up to request clarification or add additional context in comments.

2 Comments

backslash '\' is an escape character for MySql. You can see here for more info:dev.mysql.com/doc/refman/5.0/en/mysql-commands.html (look for delimiter)
I came here in search of answers for the same question. By replacing the path string with a UNC path, I eliminated all but one "Unknown command '\A'." that persists. Along the way, I ran net share, which informed me that Windows 10 Fall Creators Update lists F$ as a default share for my 7200 RPM magnetic hard drive, along with the more or less expected C# for the boot volume, which is on a solid state drive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.