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

Installer/Updater - add system check and help text re: INDEX privilege #927

Closed
robocoder opened this issue Aug 13, 2009 · 6 comments
Closed
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone

Comments

@robocoder
Copy link
Contributor

In MySQL, you can create indexes in the table definition, if you have CREATE TABLE privileges. But to add/drop indexes on existing tables, requires the INDEX privilege. (This privilege may not be granted by sysadmins when creating a db user.)

See:

  • SHOW GRANTS;
  • SELECT privilege_list FROM mysql.user WHERE user = ' database.username ';
  • SELECT privilege_list FROM mysql.db WHERE user = ' database.username ' and db = ' database.dbname ';

Keywords: wishlist

@robocoder
Copy link
Contributor Author

I'm going to close this ticket for now. It's MySQL specific, and we don't check all the other privileges...

@mattab
Copy link
Member

mattab commented Mar 29, 2010

I agreed with the closed tickets - can we instead add a FAQ item?
Anthon, you now have WP privilege to add faq items I believe. otherwise just send me the Q&A and I'll add it!

vote for wontfix

@robocoder
Copy link
Contributor Author

This has been a recurring pain point that I'm reluctant to close...

Q: The upgrade failed with

SQLSTATE[42000]: Syntax error or access violation: 1142 INDEX command denied to user 'myUserID'@'SomeIP' for table 'SomePiwikTable'```.  What do I do?

A: Ask your sysadmin to GRANT your database user INDEX privilege.  This is required to CREATE, DROP, and ALTER indexes.  You may be able to comment out the SQL statement to continue the upgrade, but doing so will result in degraded system performance (ie maintaining unused index ot using an efficient index).

@robocoder
Copy link
Contributor Author

s/ot/or/

@robocoder
Copy link
Contributor Author

s/efficient/inefficient/

(On my iPhone. Sorry.)

@mattab
Copy link
Member

mattab commented Apr 7, 2010

Thanks, added in FAQ: http://piwik.org/faq/how-to-update/#faq_78 - I removed the part that says you can comment the SQL as re-running the queries would most likely fail with "field already exist, table not found", etc.

@robocoder robocoder added this to the Piwik 0.6 milestone Jul 8, 2014
@robocoder robocoder self-assigned this Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

2 participants