I just dropped the entire database.
I logged into MySQL as the user Nextcloud uses, and typed “show databases;”
I give all my databases a name that makes it obvious what it’s for. This is the result of the above command:
| Database |
| information_schema |
| mysql |
| nextcloud_db |
| performance_schema |
| roundcube_db |
| sys |
6 rows in set (0.00 sec)
That made it easy, I just dropped nextcloud_db. You’ll have called yours something else. I dropped the Nextcloud database, uninstalled Nextcloud, deleted all the Nextcloud directories, and reinstalled it. Done.
I hope that helps! Sorry I can’t be more specific. I’m on FreeBSD so my locations will be different, and you have to enter the database name yourself when installing, so I can’t tell you what yours is called.
I discovered this when I was upgrading to Nextcloud from ownCloud. They were both installed on the same machine just fine, but I couldn’t create the same admin or user names for Nextcloud.
EDIT: I haven’t needed to do this for a while, so I’m trying to remember what happened. It’s possible you may need to reinstall MySQL too. Crap, sorry, it’s been years since I’ve been in this position and I can’t really remember what I had to do. It’s definitely because the users existed in MySQL, but now I think about it, I think I ended up removing and reinstalling MySQL too.