user1946705
user1946705

Reputation: 2888

Mysqldump - problem with a path

I want to save my currently database on localhost to file. I am trying to do this with following command in my terminal (Mac - Snow leopard):

mysqldump my_database > dump.sql

And I am still getting an error 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...

I am log in to mysql and normally working with database, but I can't do back up my database. I guess the problem could be in a path to my database... but I don't know, how to fix it...

Can someone an experience with this problem?

Thank you, M.

Upvotes: 1

Views: 492

Answers (1)

Shakti Singh
Shakti Singh

Reputation: 86336

Just get out from mysql prompt.

mysql>exit

and run the command

mysqldump -u root -p my_database > dump.sql

Upvotes: 1

Related Questions