mysql -h mydatabasehost -u user -p database < schema
Try that (removed the passwd bit). I think if you are going to enter your password that way, then it needs to be right next to the -p switch
mysql -h mydatabasehost -u user -ppasswd database < schema
Also, if your SQL file has a USE command in it, you don't need to specify the database. Maybe use schema.sql?