zoph: restore to new FreedomBox breaks zoph_rw access

After you install Zoph on a fresh FreedomBox and then restore an earlier backup, the Zoph web client returns "Fatal Error : Unable to get records: SQLSTATE[HY000] [1045] Access denied for user ‘zoph_rw’@‘localhost’ (using password: YES) zophTable.inc.php: 628."

Mysql user zoph_rw is created with what looks like a generated password when Zoph is installed. The package postinstall script also writes the password to /etc/zoph.ini, which is used by the web client to access the database. Running restore overwrites zoph.ini, leaving the password in zoph.ini out of sync with the password in the database, because zoph_rw is in the mysql system database and not in the zoph database that is backed up and restored. The password in the restored zoph.ini was generated on the "old" FreedomBox before the backup, while the password in the database was generated when Zoph was installed on the "new" FreedomBox.

This issue is the subject of a Forum thread and some temporary workarounds are discussed there.