Hi,

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
mysql>

thanks

Recommended Answers

All 2 Replies

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.