Well another mantis update and another issue with it not using the
right username or password in the postinst script.

When running the upgrade debconf asks for the username for "Database
server administrator on localhost:3306"

I enter "root"

Then it asks for "Password for database server administrator on
localhost:3306" and enter the root mysql password.

When the script runs it outs the following:

Setting up mantis (0.19.2-5sarge2) ...
I: Using password from existing config file.
I: Restarting webservers: apache
E: webserver restart failed: ERROR! But /etc/init.d/apache is not
installed (or not executable).
Rotated `/var/backups/mantis.dump' at Thu May  4 16:14:46 PDT 2006.
I: Backing up database to /var/backups/mantis.dump.
mysqldump: Got error: 1045: Access denied for user 'root'@'localhost'
(using password: YES) when trying to connect
##### start debug
root localhost (my-mantis-password in /etc/mantis/config.php) mantis
##### end debug
E: Database backup failed (error 2). Bailing out.
dpkg: error processing mantis (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
mantis



Note that I've added an echo statement to line 288 of the postinst
script that says the following:
echo "$dbuser $dbserver $dbpass $dbname";

you can see the output in the script above.  Clearly the script is
using the root username but then takes the password from the
config.php when trying to do a mysqldump.

Changing line: 283 from:

           mysqldump -u"$dbuser" -h"$dbserver" -p"$dbpass" "$dbname" \
To:
           mysqldump -u"$dbadmin" -h"$dbserver" -p"$dbadmpass" "$dbname" \

fixes MY issue.

Let me know if I can be of any assistance.

attached is a patch for the /var/lib/dpkg/info/mantis.postinst file

--
Anthony Tippett - 425 443 3152

Attachment: mantis.postinst.patch.gz
Description: GNU Zip compressed data

Reply via email to