Forums

Resolved
0 votes
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
Thursday, March 28 2019, 08:07 AM
Share this post:
Responses (16)
  • Accepted Answer

    Thursday, March 28 2019, 11:53 AM - #Permalink
    Resolved
    0 votes
    Arnaud Forster wrote:

    Last question : Nextcloud is in version 13.05... is it possible to upgrade or should I wait the automatic one ?
    I'll have to ask.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 28 2019, 11:29 AM - #Permalink
    Resolved
    0 votes
    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 ?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 28 2019, 11:13 AM - #Permalink
    Resolved
    0 votes
    could it be possible that different versions of nextcloud in my system create these problems ?
    I've many folders from nexcloud that have been created today and some others date from september the 1st 2018 ...
    should I uninstall nextcloud and manually remove these folders ?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 28 2019, 11:00 AM - #Permalink
    Resolved
    0 votes
    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) ?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 28 2019, 10:46 AM - #Permalink
    Resolved
    0 votes
    here's the first part :

    MariaDB [(none)]> use nextcloud
    Database changed
    MariaDB [nextcloud]> show tables;
    Empty set (0.00 sec)
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 28 2019, 10:36 AM - #Permalink
    Resolved
    0 votes
    If it helps at all, on installation, the rpm should run /usr/clearos/apps/nextcloud_business/deploy/install and possible /usr/clearos/apps/nextcloud_business/deploy/upgrade. You are welcome to trace then through!
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 28 2019, 10:31 AM - #Permalink
    Resolved
    0 votes
    If it is any consolation, my roundcubemail and reports are latin1_swedish_ci, the rest are utf8_general_ci. I am not sure that is an issue.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 28 2019, 10:28 AM - #Permalink
    Resolved
    0 votes
    So what happens if you logon manually then go:
    use nextcloud
    show tables;


    You can shortcut the logon with:
    /usr/clearos/sandbox/usr/bin/mysql -u root -p`cut -f3 -d" " /var/clearos/system_database/root`
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 28 2019, 10:26 AM - #Permalink
    Resolved
    0 votes
    Hmmm . dont know what to think about that : I displayed the list of databases and 2 of them (nextcloud and mysql) have the latin1_swedish_ci character set ? Nothing to do with my french language (but I know thera are many confusions between swiss and swedish) ...
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 28 2019, 10:09 AM - #Permalink
    Resolved
    0 votes
    when I open the fresh new nextcloud Database, it's empty . nothing inside ...really strange
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 28 2019, 10:05 AM - #Permalink
    Resolved
    0 votes
    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 ...
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 28 2019, 09:46 AM - #Permalink
    Resolved
    0 votes
    so, backuped database and deleted nextcloud database.... but yet ... blocked in the 'work in progress' status... and phpmyadmin doesnt answer anymore ... still waiting
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 28 2019, 09:19 AM - #Permalink
    Resolved
    0 votes
    Perfect, find it .. wrong password used ... trying to remove nextcloud database ...
    Thanks Nick :)
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 28 2019, 09:15 AM - #Permalink
    Resolved
    0 votes
    That is correct. Log on to the System Database, select Databases and you'll see all the databases, including Nextcloud, there.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 28 2019, 09:13 AM - #Permalink
    Resolved
    0 votes
    Hello Nick,
    Thanks very much for the informations. In the meantim, I installed phpMyAdmin and log into it but ... very strange because no NextCloud database displayed ?? only Main Database, System Database and System Database - SSO ...
    will try to connect from the command line
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 28 2019, 08:55 AM - #Permalink
    Resolved
    0 votes
    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:
    /usr/clearos/sandbox/usr/bin/mysql -u root -p{your_password}
    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.

    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:
    /usr/clearos/sandbox/usr/bin/mysqldump -unextcloud -p`cut -f3 -d" " /var/clearos/system_database/nextcloud` nextcloud > /tmp/nextcloud.dmp
    I don't know how to resotre the dump for the moment.
    The reply is currently minimized Show
Your Reply