Mysqldump problem


I am trying to back up a database but am having no success. I have tried a number of variations of:
mysqldump --opt -p --user=cmsborg2 cmsob_org_2 > file.sql

It requests the password and I enter it. Then I get:
mysqldump: Got error: 1045: Access denied for user ‘cmsborg2’@‘’ (using password: YES) when trying to connect

However if I type:
mysql -u cmsoborg2 -p -h cmsob_org_2
it allows me to log in. Any idea what I am doing wrong with mysqldump?


The usernames in your two examples don’t match — the first one is “cmsborg2”, the second one is “cms[color=red]o[/color]borg2”. Could that be it?


Thank you Andrew. I tried all kinds of things but failed to see the missing ‘o’.