dbispconfig database restore failed

Discussion in 'Installation/Configuration' started by RockIT, Apr 21, 2020.

  1. RockIT

    RockIT New Member

    I had big trouble with my database because of a server power failure. InnoDB was corrupt.

    Now I want to import all my mysql dumps into ispconfig again with a fresh installed mariadb.

    I also installed again ispconfig to have a clean database for this.

    But the import of my backed up ispconfig database failed with following error:
    ERROR 1062 (23000) at line 50: Duplicate entry '1' for key 'PRIMARY'

    Server is Ubuntu 16.04.
    ISPconfig is latest 3.1.15p3

    My backup is also from this version. It's just 2 days old.

    I don't understand this error. I can import my website sql dumps without an error but not the ispconfig database.

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the SQL dump to find out which database table and value it is.
    RockIT likes this.
  3. RockIT

    RockIT New Member

    With which command can I check this?
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    This is a text file, so you can use any text editor for that.
  5. RockIT

    RockIT New Member

    INSERT INTO `aps_settings` (`id`, `name`, `value`) VALUES (1,'ignore-php-extension',''),(2,'ignore-php-configuration',''),(3,'ignore-webserver-module','');

    This is the line
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess you can try to remove the primary key of that table temporarily.
  7. RockIT

    RockIT New Member

    I think I get it, but the problem is that now mysql users are not present in the mysql table. How can I sync this again? In ISPconfig I see the users of mysql, ftp, mail and so on. How can I get this users again in all the tables?

    I startet a Resync on ISP cnfig Webgui but this stucks..

    Attached Files:

    Last edited: Apr 23, 2020
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You have to solve that problem first, you can not do any changes via the ISPConfig Panel before that. Instructions: https://www.howtoforge.com/community/threads/please-read-before-posting.58408/
    As for the database problem, why are there entries already? If you installed a new system, I would expect the database to be empty and not get twice the same primary key. You could examine what that database and table contain, maybe it is something you can remove and then import dump to an empty table?
  9. RockIT

    RockIT New Member

    Hello Taleman,

    I now solved hopefully all database problems but I see in cron.log the following Error messages:

    PHP Fatal error: Uncaught Error: Call to undefined function mysqli_init() in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php:83

    I think this is the problem why ISPconfig not syncing.

    I googled a little bit and find out that this is a problem of the installed php versions. But I checked all my versions (5.6, 7.0, 7.1, 7.2, 7.3 and 7.4) All have the php-mysql package installed so I down't understand why this error occure.
  10. RockIT

    RockIT New Member

    I also solved the problem with the mysqli_init() failure, bute the ISPconfig is still not syncing the configurations, and my websites are poorly slow... :(
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    maybe you replaced the system php version with a different version that lacks required features while installing the additional PHP versions? Which errors do you get when you run the ispconfig server.sh script on the shell with debug mode enabled?

    and post the result of:

    php --version


    which php


Share This Page