Is there anybody that knows as to run a query from DOS (I tried with --execute source filename.sql and the error meassege is ERROR1102: incorrect database name filename. When I enter mysql and use directly source filename.sql the query runs).
The --execute or -e option is used when you want to embed your SQL in the command line, for example: [tt]
mysql -u username -ppassword -e "select * from tbl" dbname
[/tt]
To execute from a batch file, you would use: [tt]
mysql -u username -ppassword dbname < sourcefile.sql
[/tt]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.