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

Unused mysql privileges required even if not used/not needed at all #8616

Closed
arekm opened this issue Feb 20, 2017 · 1 comment
Closed

Unused mysql privileges required even if not used/not needed at all #8616

arekm opened this issue Feb 20, 2017 · 1 comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed

Comments

@arekm
Copy link

arekm commented Feb 20, 2017

magento 2.1.1 reports:

Database user does not have enough privileges. Please make sure SELECT, INSERT,
UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, 
CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, 
CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, 
EVENT, TRIGGER privileges are granted to table ...

From looking at
9e8fc42
it seems that someone simply replaced "ALL PRIVILEGES" with list of all possible privileges even if magento2 doesn't use/need some of these.

For example "REFERENCES" privilege. According to mysql docs:
https://dev.mysql.com/doc/refman/5.6/en/privileges-provided.html#priv_references

The REFERENCES privilege is unused before MySQL 5.6.22. As of 5.6.22, creation of a foreign key constraint requires at least one of the SELECT, INSERT, UPDATE, DELETE, or REFERENCES privileges for the parent table.

Notice the "OR". So if db user has one of SELECT, INSERT, UPDATE, DELETE (which will be true for magento2 case) it doesn't need REFERENCES privilege.

Also tried to find out where EVENT is used but I failed to find code that uses mysql events in magento2 sources.

What should happen? Unused privileges like REFERENCES, EVENT should be dropped from requirements list.

magento-team pushed a commit that referenced this issue Jun 21, 2017
 - Merge Pull Request #8784 from cavalier79/magento2:fix8616
 - Merged commits:
   1. 6bf2f23
   2. 2464c66
   3. aad5ba9
   4. ae6a297
   5. c268d58
@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Sep 11, 2017
@magento-engcom-team
Copy link
Contributor

@arekm, thank you for your report.
The issue is already fixed in 2.2.0

@magento-engcom-team magento-engcom-team added 2.2.x Fixed in 2.2.x The issue has been fixed in 2.2 release line labels Sep 20, 2017
magento-devops-reposync-svc pushed a commit that referenced this issue Dec 8, 2023
[Bluetooth] Community Pull Requests delivery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed
Projects
None yet
Development

No branches or pull requests

2 participants