This is what I get on the command line:
>mysql --user=root --password=password --port=3308 < temp.sql
size
756.57812500
Now, if I put "mysql --user=root --password=password --port=3308 < temp.sql" in a batch file and run it, this is what I get:
>sizetest.bat
>mysql --user=root --password=password --port=3308 0<temp.sql
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
I'm obviously able to connect to MySQL, but for some reason it doesn't work when it's in a batch file as opposed to simply typing it out. Why is this?
EDIT: It worked in the batch file when I put
"mysql -uroot -ppassword -P3308 < temp.sql"
instead of
"mysql --user=root --password=password --port=3308 < temp.sql"
I'd still like to know the nature of this anomaly, however. Perhaps some dashes need to be escaped or something like that?
>mysql --user=root --password=password --port=3308 < temp.sql
size
756.57812500
Now, if I put "mysql --user=root --password=password --port=3308 < temp.sql" in a batch file and run it, this is what I get:
>sizetest.bat
>mysql --user=root --password=password --port=3308 0<temp.sql
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
I'm obviously able to connect to MySQL, but for some reason it doesn't work when it's in a batch file as opposed to simply typing it out. Why is this?
EDIT: It worked in the batch file when I put
"mysql -uroot -ppassword -P3308 < temp.sql"
instead of
"mysql --user=root --password=password --port=3308 < temp.sql"
I'd still like to know the nature of this anomaly, however. Perhaps some dashes need to be escaped or something like that?