Database error fix… mysqldump: Couldn’t execute show create table view

Today I found that my automated MySQL backups have been choking for the last few days with “mysqldump: Couldn’t execute show create table view” because I recently added a view to one of the databases. Apparently the backup user needs some additional rights. ¬†Now I know that the views in MySQL have an odd security structure and there were bugs in an older 5.0.x version, but that is long since patched. After a little more research I found my backup user needed the “SHOW VIEW” permission.

1
2
GRANT SHOW VIEW ON mydatabase.*
TO backupuser IDENTIFIED BY 'somepassword';

If that does not do it for you, and you are still running 5.0.x, you’ll want to see this bug report¬†http://bugs.mysql.com/bug.php?id=24070 for solutions.

Category(s): Code Snippets, Database, MySQL, Server Administration
Tags: , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

 

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam protection by WP Captcha-Free