Forum archive
Mantis Restore/Migrate fails // sql-user mantis wrong password
Hi (again),
since you've been so helpful with the last report, I figured you could maybe help me with this one as well.
I have an old Mantis Turnkey Installation (TK12.0, Mantis 1.1.8), which I want to upgrade and also move from the local network to the cloud.
When opening the URL of the new instance (TK14.0, Mantis 1.2.19), I get the following error after the backup/migrate/restore process with tklbam.
APPLICATION ERROR #400 Database connection failed. Error received from database was #1045: Access denied for user 'mantis'@'localhost' (using password: YES). Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section. Previous non-fatal errors occurred. Page contents follow. SYSTEM WARNING: 'mysqli_real_connect(): (28000/1045): Access denied for user 'mantis'@'localhost' (using password: YES)' in '/var/www/mantis/library/adodb/drivers/adodb-mysqli.inc.php' line 110
I guess it really is a no-brainer, but I have no idea where in the system (besides in the mysql db) I have to alter the password.
Can you give me a hint or probably point me to a solution?
Thanks in advance!
edit: typo
However there could actually be deeper issues... IIRC Mantis was previously installed from the Debian repos; but it was removed in Debian Jessie (what v14.0 is based on) so we installed it direct from upstream. This means that there is a possibility that some of the files are actually in the wrong place, although I'm not sure on that...
Bottom line is that the mantis config file is providing the correct DB user account (mantis) but the wrong password. Once you work out where this file is then you can adjust it to use the correct password. As I say though, there may still be further issues...
Actually now I think about it, I suspect that the old Mantis conf is in /etc (probably something like /etc/mantis.conf or /etc/mantis/mantis.conf) but the new one is within the Mantis webroot (/var/www/mantis). I suspect that it is using the credentials from the new (i.e. v14.0) mantis config file to access your old (restored) mantis DB. So depending on what files come across in the backup we mat need to exclude some files from your backup (and manually move some) to make it all work how it should...
I suggest that you do this work on a local VM for now so you don't have any cost pressures (of a running cloud server). Once you have it all sorted out; then you can do a TKLBAM backup of your fixed (v14.0) VM and it should all just work (v14.0 -> v14.0 should be really straight forward).
Regardless, let us know how you go...