@robocoder opened this issue on August 13th 2009

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 commented on September 21st 2009

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

@mattab commented on March 29th 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 commented on March 29th 2010

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 commented on March 29th 2010


@robocoder commented on March 29th 2010


(On my iPhone. Sorry.)

@mattab commented on April 7th 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.

This issue was closed on April 7th 2010
Powered by GitHub Issue Mirror