Migration Toolkit v2.x Datenbankzugriff

Discussion in 'Plugins/Modules/Addons' started by lens-flare, Oct 29, 2018.

  1. lens-flare

    lens-flare New Member

    Hallo,
    ich habe zwar bereits die Forensuche bemüht, aber finde leider kein Zufriedenstellendes Ergebnis.
    Ich teste gerade eine Migration von einem Plesk vServer zu einen Temporären ISPconfig v3 Server durch, damit ich dann wieder auf den Hauptserver zurück kann.

    Das Migrationscript läuft soweit ganz gut komplett durch (knapp 800GB). Auch die User usw werden alle angelegt, aber es erzeugt keine Datenbanken und somit bleibt auch die Roundcube DB mit den Adressen leer.

    Im Migration log finde ich folgende Einträge:
    Code:
    2018-10-28 22:52:11 - [ERROR] API call to sites_database_user_add failed.
    2018-10-28 22:52:11 - [ERROR] JSON API REPLY ERROR: database_user_error_regex<br />
    Die Verbindung wird aber erfolgreich zu MySQL aufgebaut. Ich habe auch bereits das Passwort neu gesetzt und ein MySQL test über SSH gemacht.

    Code:
    2018-10-28 22:52:08 - [INFO] File ~/.my.cnf does not exist.
    2018-10-28 22:52:08 - [INFO] File /etc/mysql/debian.cnf exists.
    2018-10-28 22:52:09 - [INFO] File /root/migration/v55/my-FfNMq0 successfully transferred.
    2018-10-28 22:52:09 - [INFO] Successfully executed command mysql -h 'localhost' -u 'root' -p'*******' -e "SELECT VERSION();"
    2018-10-28 22:52:09 - [INFO] Successfully executed command mysql -h 'localhost' -u 'root' -p'*******' -s -e "SELECT @@max_allowed_packet;"
    2018-10-28 22:52:09 - [INFO] Config file saved.
    Das Passwort habe ich hier mit ****** ersetzt

    PHP SOAP ist auf beiden Server installiert. Hängt es evtl. mit der FTPD Problematik (ftpd capabilities) auf einem VPS zusammen? Dies habe ich mit
    Code:
    --without-capabilities
    installiert.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if the mysql usernames from plesk contain chars which are not allowed for mysql users in ISPConfig. Please post an example of such a username. We might have at least temporarily change the regex that restricts mysql usernames in ISPConfig on the new server.

    Are there other errors in the log for the databases as well, or just for the database users?

    pure-ftpd is not involved in the migration, so that's not part of the issue.
     
  3. lens-flare

    lens-flare New Member

    Here are 2 examples

    I have removed the passwords

    Code:
    2018-10-28 22:52:11 - [ERROR] API call to sites_database_user_add failed.
    2018-10-28 22:52:11 - [ERROR] JSON API REPLY ERROR: database_user_error_regex<br />
     - Arguments sent were: array (
      'client_id' => '7',
      'params' =>
      array (
        'server_id' => 0,
        'database_user' => 'lens-flare-demo',
        'database_password' => '******',
        '_ispconfig_pw_crypted' => 1,
        '_ID_' => '16',
        '_migrate_status' => NULL,
        '_migrate_status_type' => true,
        '_migrate_status_dep' => true,
      ),
      'session_id' => '9482029b074839d0272956077620d48b',
    )
    2018-10-28 22:52:11 - [WARN] storeDatabaseUser: Could not resolve  for dbuser BHM to new client id.
    2018-10-28 22:52:11 - [ERROR] API call to sites_database_add failed.
    2018-10-28 22:52:11 - [ERROR] JSON API REPLY ERROR: database_name_error_regex<br />
     - Arguments sent were: array (
      'client_id' => '7',
      'params' =>
      array (
        'server_id' => '1',
        'parent_domain_id' => '5',
        'type' => 'mysql',
        'database_name' => ''******',',
        'database_user_id' => '14',
        'database_ro_user_id' => 0,
        'database_charset' => 'utf8',
        'remote_access' => 'n',
        'active' => 'y',
        'remote_ips' => '',
        '_ID_' => '1',
        '_migrate_status' => NULL,
        '_migrate_status_type' => true,
        '_migrate_status_dep' => true,
      ),
      'session_id' => '9482029b074839d0272956077620d48b',
    )
    
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Edit the file /usr/local/ispconfig/interface/web/sites/form/database_user.tform.php and change line 85 to:

    Code:
                        'regex' => '/^[a-zA-Z0-9_\-]{2,64}$/',
    this will allow the "-" in MySQL usernames.
     
    lens-flare likes this.
  5. lens-flare

    lens-flare New Member

    This works very well with usernames! Thank you!

    But I have the same problem again with databases (-). This is the file \ usr \ local \ ispconfig \ interface \ web \ sites \ form \ database.tform.php and line 103. Right?

    Code:
                        //'regex' => '/^[a-zA-Z0-9_]{2,64}$/',
                        'regex' => '/^[a-zA-Z0-9_\-]{2,64}$/',
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, that should work for the database names.
     
    lens-flare likes this.
  7. lens-flare

    lens-flare New Member

    Thanks for the support
     

Share This Page