• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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