Click to See Complete Forum and Search --> : execute MySQL batch file


zhshqzyc
March 15th, 2007, 02:35 PM
How to execute a batch sql file under windows?

I have a books.sql file located in the bin subfolder.It contains many lines of "INSERT...Value...".

but
when I am in mysql client just call


mysql> SOURCE /c:/program files/mysql/mysql server 5.0/bin/books.sql
ERROR:
Failed to open file '\c:\program files\mysql\mysql server 5.0\bin\books.sql', er
ror: 22
mysql>

hspc
March 16th, 2007, 01:52 PM
No need for the initial /
SOURCE c:/program files/mysql/mysql server 5.0/bin/books.sql