• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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