I'm running MySQL on Ubuntu 10.4 LTS and unfortunately I've been experiencing serious problems when it comes to importing a sql file.
What I actually do:
1) I move to the directory containing the sql file which is called: bk.sql
2) Then I type :
mysql -u root -p
(and then I enter the root password and everything goes smoothly)
3) I use this command to do the import operation (assuming that password =123m Database name = Mydb sql file = bk.sql)
mysql -u root -p 123m Mydb < bk.sql;
What I get is :
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 123m Mydb < bk.sql' at line 1
Is the import procedure correct?