RT5 initialize-database errors

Dear all,

I’m trying to do a fresh install of RT5.
After installing RT, when trying to initialize the database (both using the built-in webserver or the “make initialize-database” command) I get the following error:

Now creating a mysql database rt5 for RT.
Done.
Now populating database schema.
Done.
Now inserting database ACLs.
[78107] [Wed Jul  5 15:52:26 2023] [warning]: DBD::mysql::st execute failed: Can't find any matching row in the user table at /opt/rt5/sbin/../lib/RT/Handle.pm line 491. (/opt/rt5/sbin/../lib/RT/Handle.pm:491)
[78107] [Wed Jul  5 15:52:26 2023] [error]: DBD::mysql::st execute failed: Can't find any matching row in the user table at /opt/rt5/sbin/../lib/RT/Handle.pm line 491.

Stack:
  [/opt/rt5/sbin/../lib/RT/Handle.pm:491]
  [/opt/rt5/share/html/Install/Initialize.html:121]
  [/opt/rt5/share/html/Install/autohandler:60] (/opt/rt5/sbin/../lib/RT/Interface/Web/Handler.pm:216)

General info:
OS: Debian 12
Database: MariaDB 10.11.3
Perl: 5.36.0

Any ideas of what is happening?
Thank you in advance!

P.S.: What I’m trying to do is upgrading from 4.2.10 to the latest version of RT. Reading the documentation, best option is to do a fresh install and then import the database. I’m not there yet, but probably I’ll need to ask you again in the coming days :stuck_out_tongue: (Sorry for the inconveniences)

I just recently did a very similar upgrade myself, though I did not run into the same problem you’re seeing.

The error makes me think there isn’t a database user configured in your RT_SiteConfig.pm file.

You should have a section in there that looks similar to this:

# DatabaseUser is the name of the database account RT uses to read and store
# data. 'rt_user' is the default but you can change it if you like.
# DO NOT use the 'rt_admin' superuser created in the instructions.
Set($DatabaseUser, 'rt_user');
# DatabasePassword is the password for DatabaseUser.
Set($DatabasePassword, 'EDIT WITH SomePassphraseHere');

This above section came from the EXTREMELY helpful doc on the wiki:

https://rt-wiki.bestpractical.com/wiki/ManualInstallation

Thank you so much!

It seems that the combination of:
a) Using the web-based initialization +
b) Using an empty password for the rt user
does not work properly.

If someone faces the same problem, just set a password for the rt user and initialize everything.
Then, you can remove the password from mysql directly (and modify the RT_SiteConfig.pm accordingly).