Reputation: 57
I’m in the MySQL command line client mysql monitor
, trying to do a mysqldump
command on the database with which I have an open connection. This is the command I’m using at the mysql>
prompt:
mysqldump -u username -p password databasename > dumpfilename.sql\g.
I assume that the file dumpfilename.sql
will be created when the dump is successful. I have tried it with and without pw
, un
, end-of-line semicolon, etc. I am getting
error 1064 syntax error
over and over again. What am I doing wrong?
Upvotes: 0
Views: 1158
Reputation: 72177
mysqldump
is a program, not a MySQL command. Exit the mysql
client and enter the mysqldump -u username -p password databasename > dumpfilename.sql
command at the shell prompt and it will work
Upvotes: 4