So I added a bunch of files to my users in Nextcloud. I ran the occ files command on each user individually. every user went great, until it came to the admin user (my user), which has the most number of files. After the scan was finished (which took 2+ hours), I received the error that is at the bottom of this post. I’ve done some research, that suggests that in Adminer (or MySQL) I should give the admin user “All Priviledges” to the Nextcloud database. I thought I’d ask what you all think about that before I went ahead and just did it. Anyone have any experience with this error before?
For refence, this is using Unraid, and Linuxserver’s Nextcloud and MariaDB containers. All the files appear to be in the user’s folder and show up in Nextcloud. I’ve run the scan twice and had the exact same error both times.
So I was working with the config.php file, and I noticed that my database username in the config file is defined as the admin user account in nextcloud. I still have the old config file from a previous version of Nextcloud, and in that config file, the user is the database username that I defined in the MariaDB container. Is that where everything is getting all messed up? I’m going to try and change the user and password in the config file and see if it messes things up.
UPDATE: So, by putting in the username and password that I defined in the MariaDB container, Nextcloud is still working just fine. So I will re-try the occ command and in 2 hours, I will know if that was the issue.
I find it interesting that with a fresh install of Nextcloud and MariaDB that the default in the config file is the admin user that you initially create in Nextcloud when you hit the web GUI the first time. I know that when I did my first install of Nextcloud, the user that Nextcloud put into the config file was the user that MariaDB had defined in the container.
The only difference between these two installs is the versions and the fact that last time I used the official MariaDB container. So, it’s one of those two things that created the difference!
I’m not sure how the admin user got put into Nextcloud’s config file as the username, but that was the issue. You need to make sure that the username and password in Nextcloud’s config file are the same as the ones you define in the MariaDB container.
With the Nextcloud admin as the username in the Nextcloud config file, Nextcloud will appear to work, but will throw errors when you scan for files, and possible other things. The solution is NOT to give the admin user more privileges, as suggested on several other websites and in some YouTube videos that I found.
So, I’ll leave this here in case anyone has the same issue. But this is solved.
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.