Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
share|improve this question
add comment

2 Answers 2

man mysqldump

-f, --force         Continue even if we get an sql-error.
share|improve this answer
    
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
    
sorry didn't realize. –  chocripple Aug 17 '11 at 16:33
    
@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
add comment

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

share|improve this answer
1  
Because my company forces me to go through another department :( –  Chad Johnson Aug 17 '11 at 16:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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