Upgrade from RT 4.4.4 to 5.0.0

Hello,

I want to upgrade RT from version 4.4.4 to 5.0.0.

The README document specifies that one can just run some upgrade scripts:
make upgrade
make upgrade-database

In the other hand the UPGRADING-5.0 document specifies that it is better to perform a fresh install of RT5. So I am confused, the information is contradictory.

What would be the best approach?

1 Like

Upgrading to RT 5 over an existing RT 4 installation (/opt/rt4) is not recommended and will almost certainly cause issues. Instead, do a fresh install into /opt/rt5 (or your custom location) for the code portion of the upgrade. Then import your existing database and run the database upgrade steps using make upgrade-database.

It is safer to do a clean install for the new version

Thx knation.

This is the procedure that I have in mind for the upgrade:

  • Apache stop
  • make install on the downloaded RT5 files
  • Copy of RT4’s mysql database into a new one named RT5
  • make upgrade-database
  • Change my apache configuration so that it points to the install on /opt/rt5 instead of /opt/rt4
  • Apache start

Test

Sounds good, you probs already planned on it but just to be safe make sure to run ./configure again ( /opt/rt4/etc/RT_Config.pm has your last configure line ) and make fixdeps before make install

@knation I am upgrading an existing RT 4.4.4 to RT 5.0.0, I have backed up the db. I am getting the error below when I attempt to upgrade the database step:

[20092] [Thu Feb 18 11:34:16 2021] [warning]: DBI connect('dbname=rt5;host=localhost','rt_user',...) failed: Access denied for user 'rt_user'@'localhost' (using password: YES) at /usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 106. (/usr/share/perl5/vendor_perl/Carp.pm:169)
[20092] [Thu Feb 18 11:34:16 2021] [critical]: Connect Failed Access denied for user 'rt_user'@'localhost' (using password: YES)
 at /tmp/rt-5.0.0/sbin/../lib/RT.pm line 222. (/tmp/rt-5.0.0/sbin/../lib/RT.pm:409)
Connect Failed Access denied for user 'rt_user'@'localhost' (using password: YES)
 at /tmp/rt-5.0.0/sbin/../lib/RT.pm line 222.
make: *** [Makefile:393: upgrade-database] Error 255

Not sure whether I should create the rt5 DB or what is causing the issue.

Seems like password auth for connecting to the database is failing

I tried both the root and rt_user password, the error re occurs. The same password that if I test I can connect to mysql (mysql -u “username” -p) they go through

Can you share the whole command you are running to upgrade the database?

make upgrade-database

Am at step 6b of README - RT 5.0.0 Documentation - Best Practical, stuck at the above command

Not sure whether I should Ideally have the database rt5 already created or the script takes care of that…

Maybe the rt_user, user doesn’t have access to the rt5 database? I believe the upgrade database command should be using the DBA user, which is expected to have more rights. Maybe change the DBA user config to use your root user and try and run it again?

Not sure whether I should Ideally have the database rt5 already created or the script takes care of that…

If you’re running the database upgrade scripts, then they expect to find an RT 4 database ( You can call it rt5 ) that it will then upgrade to RT 5. If the database doesn’t exists that’s probably why it can’t connect :sweat_smile:

Let me try renaming the rt4 DB :slight_smile:

1 Like

Thanks. I solved the above error using the following steps:

  1. Dumped the current rt4 db
    mysqldump -u root -p"rootpassword" -R rt4 >rt4.sql
  2. Created rt5 db:
    mysqladmin -u root -p"rootpassword" create rt5
  3. Restored rt4 db to the new db
    mysql -u root -p"rootpassword" rt5 < rt4.sql
  4. Granted priviliges to rt_user on rt5 db
    mysql -u root -p"rootpassword"
    mysql>GRANT ALL PRIVILEGES ON rt5.* TO 'rt_user'@'localhost';
  5. Updated RT_Sight.pm config

Rerun the make upgrade-database, ran into a new error which solved in the thread;

2 Likes