If you did initial setup with MySQL or MariaDB the Nextcloud db will be found appropriately and you can delete same
eg
[root@myhome ~]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 5
Server version: 5.5.68-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| horde |
| mailstats |
| mysql |
| performance_schema |
| pydio |
| test |
+--------------------+
7 rows in set (0.00 sec)
MariaDB [(none)]> quit
Bye
or
[root@myhome ~]# mysql105
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 6013
Server version: 10.5.9-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| nextcloud |
| performance_schema |
+--------------------+
4 rows in set (0.005 sec)
MariaDB [(none)]>
so on my system the Nextcloud db is in Maria format, just a matter of issuing a
# MariaDB [(none)]> drop database nextcloud;
also worthwhile removing whatever user you created on the install as well..you can look up where to find that and delete it from the db