mysqldump mydatabase < /my/path/to/sqlfile.sql;
This is my command issued. What could be the cause of this syntax error, i'm pretty sure its correct.
I am trying to load an sql file to my database.
mysqldump mydatabase < /my/path/to/sqlfile.sql;
This is my command issued. What could be the cause of this syntax error, i'm pretty sure its correct.
I am trying to load an sql file to my database.
use
mysqldump -u username -p databasename > filename.sql
to export and
mysql -u username -p databasename < filename.sql
to import
Please refer: http://dev.mysql.com/doc/refman/5.6/en/mysqldump.html
Synatax of MySQL dump command is : mysqldump -u -p >
In your case if the username is root then : mysqldump -u root -p mydatabase > /my/path/to/sqlfile.sql;
This might work out!
backup: # mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql
restore:# mysql -u root -p[root_password] [database_name] < dumpfilename.sql
example
mysql -u root -ptmppassword databaseName < /tmp/fileName.sql