Unable to update user information. SQLSTATE[23000]: Integrity constraint violation.

Created:

2016-11-16 13:05:19 UTC

Modified:

2017-08-16 16:46:05 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to update user information. SQLSTATE[23000]: Integrity constraint violation.

Applicable to:

  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux

Symptoms

While trying to change customer contact information, the following error appears:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '<customername>' for key 3

Cause

The reason is in database inconsistency.

Resolution

  1. Backup 'psa' database.
  2. Forcibly update all the customers configurations in database by using the below command:.
    mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -Ne "select login, email from clients where id != 1" | while read login email; do /usr/local/psa/bin/client -u $login -email $email; done
Have more questions? Submit a request
Please sign in to leave a comment.