Error upgrading i-mscp (in Update i-MSCP database schema) [fixed]

  • Hi, I'm having an issue while upgrading my testing environment. I am adapting my documentation from ispcp to work with i-mscp.

    The problem is that I can't get enought information of what I did wrong (I guess it will be something related to recovering db keys)

    This is the message I get:

    1. i-MSCP database * Update i-MSCP database schema: [ Failed ] [FATAL] An error occurred during update process! Correct it and re-run this program.

    The content of /var/log/imscp/setup/imscp-update.log is:

    1. [ERROR]: Error: Unable to establish connection to the database! SQL returned: SQLSTATE[28000] [1045] Access denied for user 'ispcp'@'localhost' (using password: YES)
    2. StackTrace:
    3. #0 /var/www/imscp/gui/include/iMSCP/Initializer.php(194): iMSCP_Initializer->_initializeDatabase()
    4. #1 /var/www/imscp/gui/include/iMSCP/Initializer.php(98): iMSCP_Initializer->_processCLI()
    5. #2 /var/www/imscp/gui/include/environment.php(239): iMSCP_Initializer::run(Object(iMSCP_Config_Handler_File))
    6. #3 /var/www/imscp/gui/include/imscp-lib.php(115): require_once('/var/www/imscp/...')
    7. #4 /var/www/imscp/engine/setup/updDB.php(47): require_once('/var/www/imscp/...')
    8. #5 {main}

    I'd like to know wich files did I forgot to copy or adapt?

    Edited once, last by aseques ().

  • check if /var/www/imscp/engine/, /var/www/imscp/engine/messenger/ and /var/www/imscp/gui/inlude/imscp-db-key.php have same content and there is no placeholders in those file. Then check if /etc/imscp/imscp.conf have same DATABASE_PASSWORD as imscp.old.conf. I bet it is imscp-db-key.php :)

    Edited once, last by oldev01 ().

  • Ok, fixed, I had to restore the three files, luckily I had a backup, they were recreated with new data, I don't know where it came from tough.

    Just to clarify, the files say keys instead of key

    Thanks a lot!

    PS: How could this files be recreated in case something happened and you don't have backups?

  • PS: How could this files be recreated in case something happened and you don't have backups?

    Hm - how do you open your house when you have lost all the keys and the manufacturer has been gone bankrupt...

    You have to replace all lockers etc... this means: you will have to rewrite/recreate all passwords which are stored in ispcp (they are crypted and the keys above are needed to uncrypt the passwords).

    So better make a backup of theese two files (two of them are are the same...) - or at least one - then a recreation should be possible....


  • I see, you're right, I forgot that also the mail passwords were encrypted this way, I hope that nobody has to go throught that.

  • would be good to include theese files in the nightly panel-backup... :-)

    it's time to save them in the /etc/i... instead of /var/www/i....


  • Joxi, what you mean exactly ? what files ? db keys ?


  • Yes - the key files ( and php - or better only one...).

    I think we already talked/wrote about this...

    Maybe it's for V2 :-)


  • I can commit it for v1 because is ready ;) but Ratatouille will copy. So will be for v1-rewrite :)

  • Hi

    yes - I'm following the copy discussion.
    I wrote something in another (german) thread here (the discussion with tomidooli...) - of course it's not ok, but I thin with the time:
    - the code will differe more and more
    - people will learn where the code comes from - and this will give i-MSCP the "glory" :-)

    It's not worth loosing time with this. Better we try to create the V2 asap...