Bug #73075 New option for mysqldump to ignore all views
Submitted: 23 Jun 2014 7:39 Modified: 16 Dec 2014 18:21
Reporter: Christian Stoller Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any
Tags: Backup, ignore views, mysqldump

[23 Jun 2014 7:39] Christian Stoller
Description:
It is possible to ignore views from being exported by mysqldump by using the --ignore-table option. But it would be great to have an option (something like '--ignore-views') to ignore *all* views.

I found some requests like that in the web, so there are others which would like such an option, too. See http://stackoverflow.com/questions/709000/mysql-dump-tables-only and http://stackoverflow.com/questions/8520330/ignore-views-in-mysql-db-backup-using-mysqldump

I hope for positive feedback.

How to repeat:
Feature Request, so nothing to reproduce.
[23 Jul 2014 6:42] Christian Stoller
This is a common use case:

You have a production system where an issue occures. To reproduce the error you have to dump the database and import them in your local test suite. But if you have some views in the production database, they will be dumped with access data, wich won't be valid for the local test system. And than statements like this won't work:

mysql> SHOW TABLE STATUS FROM `mydatabasename`;
ERROR 1143 (42000): SELECT command denied to user ''@'192.168.55.%' for column 'method' in table 'sales_flat_order_payment'
[16 Dec 2014 18:21] Sveta Smirnova
Thank you for the reasonable feature request.

See also bug #35964 and bug #44864
[19 Dec 2024 6:13] neon cube
Is this fixed by the --ignore-views (https://dev.mysql.com/doc/refman/8.4/en/mysqldump.html#option_mysqldump_ignore-views) option?
[2 Jan 8:04] Christian Stoller
Yes, this is fixed. The Issue can be closed.