
Nextcloud 在資料表 “oc_mounts” 中,找不到索引值 “mounts_class_index”
問題 更新到Nextcloud 24.0.7發現的問題 資料庫缺少了某些索引值。由於在一個龐大的表中新增索引需要一些時間,因此它們並不會被自動新增。您可執行 “occ db:add-missing-indices” 來手動新增那些缺少的索引值。當索引值新增完成後,查詢的速度通常會變得快許多 在資料表 “oc_mounts” 中,找不到索引值 “mounts_class_index” 。 檢查您 Nextcloud 的安全性。 解決方式 於終端機執行下列命令 1 sudo -u www-data php7.4 /var/www/nextcloud/occ db:add-missing-indices 注意事項 www-data 部分為使用者名稱 php7.4 部分視你的php版本名稱而定 e.g. php php7.4 /var/www/nextcloud/occ 部分為nextcloud資料夾路徑 執行結果 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 user@myvps:~$ sudo -u www-data php7.4 /var/www/nextcloud/occ db:add-missing-indices Check indices of the share table. Check indices of the filecache table. Check indices of the twofactor_providers table. Check indices of the login_flow_v2 table. Check indices of the whats_new table. Check indices of the cards table. Check indices of the cards_properties table. Check indices of the calendarobjects_props table. Check indices of the schedulingobjects table. Check indices of the oc_properties table. Check indices of the oc_jobs table. Check indices of the oc_direct_edit table. Check indices of the oc_mounts table. Adding mounts_class_index index to the oc_mounts table, this can take some time... oc_mounts table updated successfully. user@myvps:~$ 出現 oc_mounts table updated successfully.就OK啦!



