Article ID: 2013, created on Jul 12, 2007, last review on Jun 19, 2016

Symptoms

Upgrade to Plesk 8.2 fails with the following error:

Installing psa database
mysqld (pid 2064) is running...
Trying to define valid mysql credentials...  Trying to establish test
connection... connected
done
Trying to remove chunks from MySQL database... ERROR 1062 (23000) at line 3:
Duplicate entry 'localhost-admin' for key 1
ERROR while trying to remove chunks from MySQL database

Cause

This problem occurs if the record for 'root' user exists in mysql.user table. Plesk tries to rename 'root' user to 'admin' and fails with the error.

Resolution

Rename 'root' mysql user to some other and rerun the upgrade with '--force' option:

# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin mysql -e 'update user set user="root_user" where user="root";flush privileges'
# rpm -Uvh --force ./*``

After upgrade is done, rename 'root' user back if you need it.

# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin mysql -e 'update user set user="root" where user="root_user";flush privileges'

Email subscription for changes to this article
Save as PDF