When dumping a database, I'm getting

mysqldump: Couldn't execute 'show create table `some_table`': execute command denied to user 'some_user'@'%' for routine 'some_routime' (1370)

and then the dumping just stops.

How do I make mysqldump continue when it runs into these sorts of problems? 10 minutes of Google has offered no help.

Here is the command I used:

mysqldump -u username -h localhost --port=4406 -p --databases database_name --skip-lock-tables --force > database_name.sql

man mysqldump

-f, --force         Continue even if we get an sql-error.
  • Okay, I thought this was failing, but apparently it did work. The dump seems to have finished, but the errors just so happened to have occurred toward the end, so it made it look like the errors made the dump fail. – Chad Johnson Aug 17 '11 at 16:30
  • He has already provided the --force option in the command he showed us. – Zoredache Aug 17 '11 at 16:31
  • 1
    sorry didn't realize. – chocripple Aug 17 '11 at 16:33
  • 1
    @Chad Johnson, a person might argue that if you cannot get a clean backup without using --force, then your backup did fail. The force option will suppress errors that may be important. Please do not use --force in a backup script you will depend on. – Zoredache Aug 17 '11 at 16:33
  • This is just so I can get a dump of a database to work with locally. Nothing important. – Chad Johnson Aug 17 '11 at 16:37

AFIAK, you can't. You need enough privileges to run mysqldump. Why didn't you give execute privilege to the user that running?

  • 2
    Because my company forces me to go through another department :( – Chad Johnson Aug 17 '11 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.