how to fix problem with slave server databases ?

Discussion in 'General' started by radim_h, Jul 22, 2018.

  1. radim_h

    radim_h Member HowtoForge Supporter

    Hello,
    i have multiserver setup. when i run resync tool, i'm getting error from slave mailserver, like
    WARNING - Falsche Anfrage / Wrong QuerySQL-Query = REPLACE INTO `client`
    WARNING - Falsche Anfrage / Wrong QuerySQL-Query = REPLACE INTO `spamfilter_policy`
    etc..
    There was probably problem with databse update in the past...
    When i simply copy database from master server to mailserver, will it solve the problem ? (lets hope that problematic databse is not on master server)
    Or is there another solution, like copy empty databse on server and do import of old one into it ?

    Regards
    RH
     
  2. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    I'm not sure if a
    Code:
    select `value` from `sys_config` WHERE `name`='db_version';
    
    on both dbispconfig databases reveal anything or comparing some table structures...
    if there is an error, you might also want to check what else wasn't applied to the slave
     
  3. radim_h

    radim_h Member HowtoForge Supporter

    Oh,
    the master server (MariaDB) says 3.0.2.2
    slaves says:
    mail: 3.0.3 (MariaDB), web: 3.0.2.2 (MariaDB), db:3.0.4.6 (MySQL)
    but all of them have ISPConfig 3.1.12 installed

    How should i fix this ?
    i have used "reconfigure master databse" while updating save servers

    Thank you
    RH
     
  4. radim_h

    radim_h Member HowtoForge Supporter

  5. till

    till Super Moderator Staff Member ISPConfig Developer

    What you can try is this:

    Make a backup of the current dbispconfig database on that slave server. This is really important! In case something wents wrong :)

    Then proceed like this (e.g. in phpmyadmin), all steps below are done in the dbispconfig database of that affected slave:

    1) Export the content of the dbispconfig database, but only the data, not the database structure (tables). Choose the method where the export contains the field names in the exported sql file.
    2) empty the dbispconfig database (delete all tables).
    3) Import the install/sql/ispconfig3.sql file from ISPConfig 3.1.12 tar.gz file into the database.
    4) empty all tables, but don't delete them.
    5) Import the data that you exported in 1).

    What does this procedure does is that you get the original database structure from ispconfig 3.1.12 with the data from your installation. As we normally just add fields to tables and not rename of remove them, the above procedure should work. If it does not work, then you have the full database backup that you made before you started to restore it.
     
    ahrasis likes this.

Share This Page