Hello All,
I have been trying to copy a database from a local system to remote system using the mysqldump command.However, I am not able to do so and I am getting errors.I just wanted to know syntactically where am I going wrong?
Here are the commands I have tried:
mysqldump database-name | ssh
myname@mysql.cs.abc.edu mysql new-database-name
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
dump database-name|mysql -h mysql.cs.abc.edu new-database-name' at line 1
mysql> mysqldump database-name |mysql -h mysql.cs.abc.edu new- database-name;
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
dump database-name|ssh
myname@mysql.cs.abc.edu new-database name' at line 1
I have also tried to dump my database onto a file using the following command:
mysql> mysqldump -u root -p test > test.out;
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
dump -u root -p test > test.out' at line 1
Here,test is the database name.
I am using MySQL server 5.1.40 and using Windows Vista.I would be grateful if someone can help me resolve this issue asap.