我试过这个:
mysqldump -u username -p database_name > dump.sql;
和
mysqldump -u username -ppassword database_name > dump.sql;
但我得到的只是这个错误:
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 'mysqldump -u username -p database_name > dump.sql' at line 1
我已经确认数据库存在,谁能指出发生了什么或如何解决它?