Upgrade from RT 5.0.7 to 6.0.2 - Database Issues

Hello!

We are currently on RT 5.0.7, and we are trying to upgrade to the latest RT 6.0.2.

We installed RT, ran make upgrade, and both completed successfully.

When we try to run make upgrade-database we receive the following error:

/usr/bin/perl -I/opt/rt6/local/lib -I/opt/rt6/lib sbin/rt-setup-database --action upgrade --prompt-for-dba-password
In order to create or update your RT database, this script needs to connect to your mysql instance on localhost (port ‘’) as root
Please specify that user’s database password below. If the user has no database
password, just press return.

Password:
Working with:
Type: mysql
Host: localhost
Port:
Name: rt6
User: rt_user
DBA: root
Enter RT version you’re upgrading from: 5.0.7

Going to apply following upgrades:

  • 5.0.8
  • 5.9.0
  • 5.9.1
  • 5.9.2
  • 5.9.3
  • 5.9.4
  • 5.9.5
  • 5.9.6
  • 5.9.7
  • 6.0.1

Enter RT version if you want to stop upgrade at some point,
or leave it blank if you want apply above upgrades:

IT’S VERY IMPORTANT TO BACK UP BEFORE THIS STEP

Proceed [y/N]:y
[11666] [Thu Mar 19 14:35:34 2026] [warning]: DBI connect(‘dbname=rt6;host=localhost’,‘rt_user’,…) failed: Access denied for user ‘rt_user’@‘localhost’ to database ‘rt6’ at /usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 117. (/usr/share/perl5/vendor_perl/Carp.pm:169)
[11666] [Thu Mar 19 14:35:34 2026] [critical]: Connect Failed Access denied for user ‘rt_user’@‘localhost’ to database ‘rt6’
at /root/rt-6.0.2/sbin/../lib/RT.pm line 222. (/root/rt-6.0.2/sbin/../lib/RT.pm:409)
Connect Failed Access denied for user ‘rt_user’@‘localhost’ to database ‘rt6’
at /root/rt-6.0.2/sbin/../lib/RT.pm line 222.
make: *** [Makefile:396: upgrade-database] Error 255

We added in the RT_SiteConfig.pm both the database admin and database user which gave the same access denied error.

Based off of this post: RT6 Installation – Error during make initialize-database (Access denied for user 'rt_admin') we tried switching the database admin to root and the database user to root, but neither worked.

What are we missing?

Hey there, we are in the process of upgrading to RT 6.0.2 ourselves. We built a new server on Ubuntu 24.04 and will migrate our RT 5.0.2 data into this new instance.

On your make upgrade-database issue, the root DB password needs to exist, also rt6 DB needs to exist if not already. I also had issues with localhost, check mysql and look at the root user. You can run the following sql: select user, host from user. Here is what I get:

±------------±----------+
| User | Host |
±------------±----------+
| mariadb.sys | localhost |
| mysql | localhost |
| root | localhost |
| rt_user | localhost |

I assume you have localhost in your RT_SiteConfig.pm for $DatabaseHost

Hope this helps. I had a doozy of a time getting through the process of installing RT 6.0.2, getting the perl dependencies firgured out (make fixdeps), then dumping RT 5, importing it into RT6 and then I had an issue during make upgrade-database at 5.9.2 so if you have that issue I can share what worked for me.

Scott.

Are you using the same database table with 6.0.2 as you were with 5.0.7, or a copy?

If a copy, check that rt_user actually does have access. From the mysql command line - “show grants for rt_user@localhost” and verify that it has select,insert,update,delete,create,index on rt6.*.

We want to use our existing DB that has all of our existing tickets (for reference). We don’t want to start all over again from 0.

From what I’ve read, the best thing to do is to export the RT5 DB, and then create a new RT6 DB and import and set the RT permissions, then do a make database upgrade.

Right now the upgrade is on hold, because our Title II coordinator wants us to see if RT6 is WCAG/ADA compliant. I sure hope it is, because many of us love RT.

For that part - what I did, going from 4.4.4 to 6.0.2, was to duplicate the database (after making sure I had a backup of the existing rt4 database).

mysql -u root -e "drop database if exists rt6"
mysql -u root -e "create database rt6"
mysqldump -u root rt4 | mysql -u root rt6

Then I did the build (make, make fixdeps, etc. etc.) of 6.0.2 in a separate location on the server, and configured that the way I wanted it.

Since I was using the existing rt_admin and rt_user accounts for the db, I gave the rt_user access to the new table

mysql -u root -e “grant select,insert,update,delete,create,index on rt6.* to rt_user@localhost”

Followed by (in the new install directory of course)

make upgrade
make upgrade-database

For various reasons I also wanted a little gap between existing tickets from the previous system (where we were at ~ ticket 94000) and any new ones, so I did

mysql -u root -e 'alter table rt6.Tickets AUTO_INCREMENT = 100000'

Time will tell whether I regret that or not.

1 Like