Replace missing Indices using PHPMYADMIN

I am running Nextcloud on an aapanel installation so occ is NOT an option, i cannot use sudo or definme a user to run the OCC command. I can use ssh, i simply cannot impersonate the hosting customer in it. So OCC is a no go, using version 29 so web tools are no use.

Can someone please just give the relevant commands for PHPMYADMIN to fix the tables.

  • The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running “occ db:add-missing-indices” those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster. Missing optional index “textstep_session” in table “text_steps”. Missing optional index “twofactor_providers_uid” in table “twofactor_providers”. Missing optional index “version” in table “whats_new”. Missing optional index “systag_by_tagid” in table “systemtag_object_mapping”.

By any chance, are you perhaps already the hosting customer user?

If you have the occ command and can call it, the --dry-run option gives you the sql queries.

Having the SQL queries in the GUI directly is not possible at the moment, you’d need a feature request to have this in the future (Issues · nextcloud/server · GitHub).

hi, i have the same problem. occ web isn’t working either.
wouldn’t having the sqls the most basic thing?

no. aapanel doesnt let you sudo in to run applications as its a security risk, imagine a hacker getting access to a servers root account this would allow them to mess with everything. Now ideally you wouldn’t want a hacker to have access to your server at all, but why leave the door open.

Who needs it in the GUI? This again would be a security risk. Literally just the commons to correctly build the tables in the help file, so we can use what ever CLI or phpmyadmin tool we need to fix the database, in sort if the same way every other script ever written has, In fact if yours is working, you could literally, export yours to a txt file and give us the create statement from that file and we could use that to do the repairs.

Its just the act of not knowing what the layout should be thats causing the issue.

You could have find it with the search function. I have already explained it here:


Much and good luck,
ernolf

For that reason I asked if you have perhaps directly access with the user account that is running Nextcloud, so you won’t need sudo.

You can ask for that command via occ, that is giving you the commands. To show the in the admin interface, you have to make a feature request on Issues · nextcloud/server · GitHub