Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add export option to drop user security definers from views #13057

Closed
Cruiser13 opened this issue Mar 7, 2017 · 0 comments
Closed

Add export option to drop user security definers from views #13057

Cruiser13 opened this issue Mar 7, 2017 · 0 comments
Assignees
Labels
enhancement A feature request for improving phpMyAdmin has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Milestone

Comments

@Cruiser13
Copy link

Steps to reproduce

  1. Export a database with views
  2. The dump will have lines like this:

DROP TABLE IF EXISTS object_2;
CREATE ALGORITHM=UNDEFINED DEFINER=someuser@localhost SQL SECURITY DEFINER VIEW object_2 AS select object_query_2.oo_id AS oo_id,...

  1. If you import the dump on another server (with a different username) with phpmyadmin, the views will be useless because the user there has no permission for the views.

Expected behaviour

Click some checkbox or option to export views without the definition of the current user of this view so it can be properly reimported by phpmyadmin.

Actual behaviour

Currently you'll have to manually edit each dump and remove the security definition before reimporting it on another server which is error prone and ressource intensive on large MySQL dumps.

@nijel nijel added the enhancement A feature request for improving phpMyAdmin label Mar 9, 2017
aswaniprakash added a commit to aswaniprakash/phpmyadmin that referenced this issue Aug 14, 2018
…ews on export

Signed-off-by: Aswani Prakash <aswani15prakash@gmail.com>
@MauricioFauth MauricioFauth added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Oct 29, 2018
@MauricioFauth MauricioFauth added this to the 5.0.0 milestone Oct 29, 2018
@MauricioFauth MauricioFauth self-assigned this Oct 29, 2018
MauricioFauth pushed a commit that referenced this issue Oct 29, 2018
Signed-off-by: Aswani Prakash <aswani15prakash@gmail.com>
MauricioFauth added a commit that referenced this issue Oct 29, 2018
- Fix tests

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement A feature request for improving phpMyAdmin has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants