Change the Plesk interface-language fails with the " Integrity constraint violation: " error.

Refers to:

  • Plesk 11.5 for Windows
  • Plesk 11.5 for Linux
  • Plesk
  • Plesk 12.0 for Windows

Created:

2016-11-16 13:16:38 UTC

Modified:

2016-12-21 20:20:37 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Change the Plesk interface-language fails with the " Integrity constraint violation: " error.

Symptoms

Attempts to change Administrator's interface language under Home > Profile & Preferences fails with the following message:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY'

Cause

The issue is caused by missing user admin in smb_users table of Plesk psa.database .

Resolution

Steps to resolve the issue:

  1. Make a backup copy of the psa and apsc databases:

    # mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` psa > ~/psa.`date +%F_%H:%M`.sql
    # mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` apsc > ~/apsc.`date +%F_%H:%M`.sql
  2. Check entry for user admin in psa.smb_users table:

    mysql> select * from smb_users where login='admin';
    Empty set (0.00 sec)

    The user with login name admin always has id = 1:

    mysql> select id,login from smb_users where id=1;

    +----+------------------------+
    | id | login |
    +----+------------------------+
    | 1 | <not_admin_login> |
    +----+------------------------+

    As it can be seen the login name set up incorrectly.

  3. Set up correct name:

    mysql> update smb_users set login='admin' where id=1;
Have more questions? Submit a request
Please sign in to leave a comment.