• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Database errors by MariaDB

Edward Dekker

Basic Pleskian
Hi,

When i install the latest MariaDB 10.3.8, do i'll found some problems by creating a subdomain at my website and can't proceed any further.

Code:
DB query failed: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '5' for key 'PRIMARY', query was: replace DomainServices set `id`='0', `dom_id`='9', `type`='web', `status`='0', `parameters_id`='0', `ipCollectionId`='9'
 
Last edited:
Have you run a mysqlcheck? Sounds like the table indexes may be corrupted.
 
This will do the trick as root:
Code:
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqlcheck --all-databases --analyze --auto-repair --verbose -u admin

And restart MariaDB:
Code:
$ sudo service mariadb restart

Note to all:
Do not use the Plesk repair utility for fixing up the database at Plesk Onyx 17.8.11 #15 and before.
This will damage your database again and creates inpropper index-tables at MariaDB 10.3.8 as written below.
Code:
$ sudo plesk repair db
Checking the Plesk database using the native database server tools

///________________________________________________________________________///

Checking the structure of the Plesk database
  Wrong attributes for the column 'time_stamp' in the table
  'dns_recs': ....................................................... [ERROR]
    - The attribute 'default' value mismatch: CURRENT_TIMESTAMP in
      the original schema and current_timestamp() in the Plesk
      database.
  Repair table 'dns_recs'? [Y/n] n
  Wrong attributes for the column 'time_stamp' in the table
  'dns_recs_t': ..................................................... [ERROR]
    - The attribute 'default' value mismatch: CURRENT_TIMESTAMP in
      the original schema and current_timestamp() in the Plesk
      database.
  Repair table 'dns_recs_t'? [Y/n] n
  Wrong attributes for the column 'event_time' in the table
  'exp_event': ...................................................... [ERROR]
    - The attribute 'default' value mismatch: CURRENT_TIMESTAMP in
      the original schema and current_timestamp() in the Plesk
      database.
  Repair table 'exp_event'? [Y/n] n
  Wrong attributes for the column 'register_date' in the table
  'key_history': .................................................... [ERROR]
    - The attribute 'default' value mismatch: CURRENT_TIMESTAMP in
      the original schema and current_timestamp() in the Plesk
      database.
  Repair table 'key_history'? [Y/n] n
  Wrong attributes for the column 'startTime' in the table
  'longtasks': ...................................................... [ERROR]
    - The attribute 'default' value mismatch: CURRENT_TIMESTAMP in
      the original schema and current_timestamp() in the Plesk
      database.
  Repair table 'longtasks'? [Y/n] n
  Wrong attributes for the column 'time_resp' in the table
  'resp_freq': ...................................................... [ERROR]
    - The attribute 'default' value mismatch: CURRENT_TIMESTAMP in
      the original schema and current_timestamp() in the Plesk
      database.
  Repair table 'resp_freq'? [Y/n] n
Checking the consistency of the Plesk database ...................... [OK]
Error messages: 6; Warnings: 0; Errors resolved: 0
Plesk should adjust his files for solving these problems.

Have you run a mysqlcheck? Sounds like the table indexes may be corrupted.
 
Last edited:
Back
Top