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!
To do this, put the commands you want to run in a file, then tell mysql to read its input from the file: shell> mysql < batch-file If you are running mysql under Windows and have some special characters in the file that cause problems, you can do this: C:\> mysql -e "source batch-file" If you need to specify connection ...
MySQL supports two types of batch loading.
The MySQL monitor can be used in interactive mode or in batch mode. In interactive mode, you type in SQL queries or MySQL commands such as SHOW DATABASES at the MySQL prompt, and view the results. In batch mode, you tell the monitor to read in and execute a list of commands from a file.
Try using forward slash /
in place of back slash \
in file path:
C:/Users/Owner/Documents/newbie.sql
or put it between double quotes ("
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With