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 -uadmin -p`cat /etc/psa/.psa.shadow ` 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 -uadmin -p`cat /etc/psa/.psa.shadow ` mysql -e 'update user set user="root" where user="root_user";flush privileges;'