Symptoms
A Plesk Panel upgrade fails with the error below:
ERROR: Zend_Db_Statement_Exception
SQLSTATE[HY000]: General error: 1017 Can't find file: './psa/smb_apsPackages.frm' (errno: 13)"
I start the bootstrapper script to repair Plesk Panel and continue the upgrade process, but it fails too:
/usr/local/psa/bootstrapper/pp11.0.9-bootstrapper/bootstrapper.sh repair
ERROR while trying to upgrade MySQL password format for Sitebuilder user
Cause
The Presense Builder database user was not created during the Plesk upgrade.
Resolution
Back up the current Plesk Panel databases:
mysqldump -u admin -p`cat /etc/psa/.psa.shadow` psa > ~/psa.`date +%F_%H:%M`.sql mysqldump -u admin -p`cat /etc/psa/.psa.shadow` apsc > ~/apsc.`date +%F_%H:%M`.sql
Find the first preupgrade dump in the
/var/lib/psa/dumps/
directory that has the following format:mysql.preupgrade.9.5.4-11.0.9.20130726-102859.dump
Where:
a) 9.5.4 - Plesk version before upgrade
b) 11.0.9 - Plesk version you are upgrading to
c) 20130726 - Date when upgrade started
d) 102859 - Time when upgrade started
Restore it:
zcat /var/lib/psa/dumps/mysql.preupgrade.9.5.4-11.0.9.20130726-102859.dump | mysql -uadmin -p`cat /etc/psa/.psa.shadow`
Check that the Presense Buidler user exists in the
mysql
database:#mysql -u admin -p`cat /etc/psa/.psa.shadow` mysql -sNe "select User from user where user='pp_sb_db'" pp_sb_db
If the user is absent, then create it:
a) For MySQL server version 5.1:
#mysql -u admin -p`cat /etc/psa/.psa.shadow` mysql -sNe "insert into mysql.user values ('localhost','pp_sb_db','*3B063F312BAD7DB54911C318959EB12FF43925DB','N','N','N','N','N','N','N', 'N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N', 'N','','','','',0,0,0,0);"
b) For MySQL server version 5.5:
#mysql -u admin -p`cat /etc/psa/.psa.shadow` mysql -sNe "insert into mysql.user values ('localhost','pp_sb_db','*5D648C6BA7EC62DCBE81954B0FA0F9E18FFFF856','N','N','N','N','N','N','N', 'N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N', 'N','','','','',0,0,0,0,'',NULL);"
Set a valid password for the pp_sb_db user from the
/usr/local/sb/config
file:a) Get the password:
# grep password /usr/local/sb/config password = qwet1235
b) Update the database user with the password from the previous step:
#mysql -u admin -p`cat /etc/psa/.psa.shadow` mysql -sNe "update mysql.user set password=password('qwet1235') where user='pp_sb_db';"
Launch bootstraper again to perform a database upgrade:
/usr/local/psa/bootstrapper/pp11.0.9-bootstrapper/bootstrapper.sh repair