When i try to restore a database, I get this error

ubuntu@ubuntu:~$ mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 44
Server version: 5.0.75-0ubuntu10.2 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use asg;
Database changed
mysql> mysql -u root -p assignment < /var/www/e-asg/docs/asg.sql
    -> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql -u root -p assignment < /var/www/e-asg/docs/asg.sql' at line 1


Execute this command in shell (not on mysql prompt) like

ubuntu@ubuntu:~$ mysql -u root -p assignment asg < /var/www/e-asg/docs/asg.sql

Thank you mwasif, you are right.
It is solved