Forums

Mysqldump syntax error

Hi there, I'm trying to backup my sql database from the mysql consol with this syntax (replacing the variables with my username and database name of course):

mysqldump -u yourusername -h yourusername.mysql.pythonanywhere-services.com 'yourusername$dbname'  > db-backup.sql

(which I found here: https://help.pythonanywhere.com/pages/MySQLBackupRestore/)

And I get this error: ERROR 1064 (42000): You have an error in your SQL syntax;

Does anybody have an idea why?

Thanks a lot!

Can you try typing the same thing in a bash console, not MySQL console?

It worked! Thanks a lot

No problem.