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

MySQL Database rights #6745

Closed
mpiscaer opened this issue Oct 3, 2017 · 4 comments
Closed

MySQL Database rights #6745

mpiscaer opened this issue Oct 3, 2017 · 4 comments
Labels
1. to develop Accepted and waiting to be taken care of bug enhancement good first issue Small tasks with clear documentation about how and in which place you need to fix things in.

Comments

@mpiscaer
Copy link

mpiscaer commented Oct 3, 2017

Hi,

I just did an Nextcloud update to 12.0.2 and it failed three times. All becourse it was missing the database rights.

The database use had only the following rights: SELECT, INSERT, UPDATE, DELETE. After adding the rights: ALTER, CREATE, DROP the upgrade was successful.

I would expect that this would be checked at the beginning of the upgrade and if was something missing I would be report is what is missing and not failing the upgrade three times.

@j-ed
Copy link
Contributor

j-ed commented Oct 3, 2017

@mpiscaer Unfortunately you haven't used the issue template to provide all necessary information which allows a developer to analyze the root cause of the problem. 😟

@rullzer
Copy link
Member

rullzer commented Oct 3, 2017

Fair enough we should probably check this.

@MorrisJobke

@rullzer rullzer added this to the Nextcloud 13 milestone Oct 3, 2017
@rullzer rullzer added 1. to develop Accepted and waiting to be taken care of bug enhancement labels Oct 3, 2017
@MorrisJobke MorrisJobke added the good first issue Small tasks with clear documentation about how and in which place you need to fix things in. label Oct 23, 2017
@rullzer rullzer removed this from the Nextcloud 13 milestone Dec 28, 2017
@mpiscaer
Copy link
Author

I just tryed to update nextcloud from Current version is 12.0.5. to
Update to Nextcloud 13.0.0 available. (channel: "stable")

The mysql database user was missing the right to create an index. The issue is that the upgrade script is not checked at the start of the upgrade if the needed rightes where OK.

I did do:

root@nextcloud:/var/www/nextcloud# sudo -u www-data php occ upgrade               
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Set log level to debug
Turned on maintenance mode
Updating database schema
Updated database
Updating <federatedfilesharing> ...
Updated <federatedfilesharing> to 1.3.1
Updating <files_pdfviewer> ...
Updated <files_pdfviewer> to 1.2.0
Updating <files_texteditor> ...
Updated <files_texteditor> to 2.5.1
Updating <files_videoplayer> ...
Updated <files_videoplayer> to 1.2.0
Updating <gallery> ...
Updated <gallery> to 18.0.0
Updating <password_policy> ...
Updated <password_policy> to 1.3.0
Updating <provisioning_api> ...
Updated <provisioning_api> to 1.3.0
Updating <serverinfo> ...
Updated <serverinfo> to 1.3.0
Updating <survey_client> ...
Updated <survey_client> to 1.1.0
Updating <twofactor_backupcodes> ...
Updated <twofactor_backupcodes> to 1.2.3
Updating <updatenotification> ...
Updated <updatenotification> to 1.3.0
Updating <federation> ...
Updated <federation> to 1.3.0
Updating <lookup_server_connector> ...
Updated <lookup_server_connector> to 1.1.0
Updating <oauth2> ...
Updated <oauth2> to 1.1.0
Updating <files> ...
Updated <files> to 1.8.0
Updating <activity> ...
Updated <activity> to 2.6.1
Updating <dav> ...
Doctrine\DBAL\Exception\ConnectionException: An exception occurred while executing 'CREATE INDEX IDX_E98F2EC48B26C2E9 ON oc_cards (addressbookid)':

SQLSTATE[42000]: Syntax error or access violation: 1142 INDEX command denied to user 'nextcloud'@'localhost' for table 'oc_cards'
Update failed
Maintenance mode is kept active
Reset log level

@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@nextcloud-bot nextcloud-bot mentioned this issue Jul 29, 2018
@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Oct 1, 2018
@szaimen
Copy link
Contributor

szaimen commented May 20, 2021

As I cannot reproduce the original issue anymore, I will close this ticket. If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen or create a new issue with all required information!

@szaimen szaimen closed this as completed May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug enhancement good first issue Small tasks with clear documentation about how and in which place you need to fix things in.
Projects
None yet
Development

No branches or pull requests

8 participants