Bootstrapper fails with error: "Can't find any matching row in the user table"

Created:

2016-11-16 12:56:50 UTC

Modified:

2017-04-24 12:06:39 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Bootstrapper fails with error: "Can't find any matching row in the user table"

Applicable to:

  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux

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

  1. Back up the current Plesk Panel databases:

    MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin psa > ~/psa.`date +%F_%H:%M`.sql  
    MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin apsc > ~/apsc.`date +%F_%H:%M`.sql
  2. 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

  3. Restore it:

    zcat /var/lib/psa/dumps/mysql.preupgrade.9.5.4-11.0.9.20130726-102859.dump |  MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin
  4. Check that the Presense Buidler user exists in the mysql database:

    #MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin mysql -sNe "select User from user where user='pp_sb_db'"
    pp_sb_db
  5. If the user is absent, then create it:

    a) For MySQL server version 5.1 :

    #MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin 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_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin 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);"
  6. 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_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin mysql -sNe "update mysql.user set password=password('qwet1235') where user='pp_sb_db';"
  7. Launch bootstraper again to perform a database upgrade:

    /usr/local/psa/bootstrapper/pp11.0.9-bootstrapper/bootstrapper.sh repair
Have more questions? Submit a request
Please sign in to leave a comment.