Hello all,
I installed nextcloud on my server and because of problems, I decided to remove it and re-install it again. Installation was fine but at the end, I've a problem because of creating tables in MariaDB is not possible (tables already exist).
Is there a way to clear the database from my previous installatino to allow the new one creating its tables ?
Error while trying to create admin user: An exception occurred while executing 'CREATE TABLE oc_migrations (app VARCHAR(255) NOT NULL, version VARCHAR(255) NOT NULL, PRIMARY KEY(app, version)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB': SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'oc_migrations' already exists
Thanks to all for your help
I installed nextcloud on my server and because of problems, I decided to remove it and re-install it again. Installation was fine but at the end, I've a problem because of creating tables in MariaDB is not possible (tables already exist).
Is there a way to clear the database from my previous installatino to allow the new one creating its tables ?
Error while trying to create admin user: An exception occurred while executing 'CREATE TABLE oc_migrations (app VARCHAR(255) NOT NULL, version VARCHAR(255) NOT NULL, PRIMARY KEY(app, version)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB': SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'oc_migrations' already exists
Thanks to all for your help
Share this post:
Responses (16)
-
Accepted Answer
Hello Arnaud,
The Nextcloud database is in system-mariadb. You can either use the command line to log onto system-mariadb and drop the table, or if you have MariaDB installed, use the phpMariaDB dool from the Webconfig > Server > Database > MariaDB Database Server menu and choose the System Database at the login screen. Your system database password is in /var/clearos/system_database/root. At the command line you can log in with:
and don't leave a space after the -p. I don't know the commands to drop the database but then can easily be searched for./usr/clearos/sandbox/usr/bin/mysql -u root -p{your_password}
In phpMyAdmin, log in, then select Databases near the top. You should then be able to select the Nextcloud database then the Drop button.
It may be a (very) good idea to back up the database first with something like:
I don't know how to resotre the dump for the moment./usr/clearos/sandbox/usr/bin/mysqldump -unextcloud -p`cut -f3 -d" " /var/clearos/system_database/nextcloud` nextcloud > /tmp/nextcloud.dmp
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
ok, database remove. Reinstalling nextcloud ...
Everything was fine, I checked before starting the installation that there was no database 'nexcloud' and then started the installation. I then refreshed my phpmyadmin page and a new Nextcloud database had been created. After that, when trying to connect for the first time in my nexcloud webpage, I get the following error :
Error while trying to create admin user: An exception occurred while executing 'CREATE TABLE oc_migrations (app VARCHAR(255) NOT NULL, version VARCHAR(255) NOT NULL, PRIMARY KEY(app, version)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB': SQLSTATE[42S01]: Base table or view already exists: 1050 Table '`nextcloud`.`oc_migrations`' already exists
strange because no old database remained ... -
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
I tried the install command ( /usr/clearos/apps/nextcloud_business/deploy/install) but many errors ...
here's the first one :
[root@eschert deploy]# ./install
Updating privileges
Updating existing config.php with system database settings
Updating database LDAP settings
Nextcloud is not installed - only a limited number of commands are available
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "app:install" is not defined.
Did you mean one of these?
app:check-code
maintenance:install
should I remove the whole before trying to install it again ?
if yes, should I remove these directories, too (/usr/clearos/apps/nextcloud_business) ? -
Accepted Answer
-
Accepted Answer
ok, deinstallin the application, removing manuall all folders, deleted the nextcloud database AND nexcloud user in phpmyadmin and reinstalled the applicatin wokred !!
Thanks for your help Nick
Last question : Nextcloud is in version 13.05... is it possible to upgrade or should I wait the automatic one ? -
Accepted Answer
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »