3.0->3.4 rt-setup-database schema authentication

In upgrading from 3.0.11 to 3.4.1, the rt-setup-database script works as
expected with “–action acl” and “–action schema”, but "–action insert"
fails authentication (for all etc/upgrade/ version scripts).

The root password works fine on the other 2 steps and mysql CLI. I’m
using Perl 5.8.4, DBIx::SearchBuilder 1.22.

Here’s a transcript. Didn’t see this problem mentioned in the wiki or
archives. Anyone have ideas? If not, I’ll dig in…

root@rt rt-3.4.1 # /usr/local/rt-3-4-1/sbin/rt-setup-database --dba root --prompt-for-dba-password --action insert --datadir etc/upgrade/3.3.0/
In order to create or update your RT database,this script needs to connect
to your mysql instance on localhost as root.
Please specify that user’s database password below. If the user has no
database
password, just press return.

Password:
DBI connect(‘dbname=rt3-test;host=localhost’,‘root’,…) failed: Access denied for user: ‘root@localhost’ (Using password: YES) at /usr/lib/perl5/site_perl/5.8.4/DBIx/SearchBuilder/Handle.pm line 98
Connect Failed Access denied for user: ‘root@localhost’ (Using password: YES) at /usr/local/rt-3-4-1/lib/RT.pm line 168

Troy

In upgrading from 3.0.11 to 3.4.1, the rt-setup-database script works as
expected with “–action acl” and “–action schema”, but "–action insert"
fails authentication (for all etc/upgrade/ version scripts).

For what it’s worth, I didn’t have any problems when I did my upgrade.

Password:
DBI connect(‘dbname=rt3-test;host=localhost’,‘root’,…) failed: Access denied for user: ‘root@localhost’ (Using password: YES) at /usr/lib/perl5/site_perl/5.8.4/DBIx/SearchBuilder/Handle.pm line 98
Connect Failed Access denied for user: ‘root@localhost’ (Using password: YES) at /usr/local/rt-3-4-1/lib/RT.pm line 168

well, does root@localhost have permission? I’ve run into a lot of
trouble around mysqls handling of users. Sometimes I seem to need
"root" sometimes “root@localhost”. I’d look at that first.

seph

I ran into the authentication problem with these scripts as well, and
used the -p switch. It then asked for the root password.

–DougOn Wed, 23 Mar 2005 10:43:14 -0500, seph seph@directionless.org wrote:

In upgrading from 3.0.11 to 3.4.1, the rt-setup-database script works as
expected with “–action acl” and “–action schema”, but "–action insert"
fails authentication (for all etc/upgrade/ version scripts).

For what it’s worth, I didn’t have any problems when I did my upgrade.

Password:
DBI connect(‘dbname=rt3-test;host=localhost’,‘root’,…) failed: Access denied for user: ‘root@localhost’ (Using password: YES) at /usr/lib/perl5/site_perl/5.8.4/DBIx/SearchBuilder/Handle.pm line 98
Connect Failed Access denied for user: ‘root@localhost’ (Using password: YES) at /usr/local/rt-3-4-1/lib/RT.pm line 168

well, does root@localhost have permission? I’ve run into a lot of
trouble around mysqls handling of users. Sometimes I seem to need
"root" sometimes “root@localhost”. I’d look at that first.

seph


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

RT Administrator and Developer training is coming to your town soon! (Boston, San Francisco, Austin, Sydney) Contact training@bestpractical.com for details.

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Douglas Denny
Halifax, NS
FWD Number: 631104

Finally had a few minutes to track this down.

After “make upgrade”, the Makefile prints examples of the 3
rt-setup-database upgrade commands using --prompt-for-dba-password.

rt-setup-database prompts for the password, but it only honors the
user-provided password for --action acl and --action schema.

For --action insert, it prompts for the password, then silently uses the
RT config file password ($DatabasePassword), even though that’s the RT DB
user password ($DatabaseUser), not necessarily root’s password.

Troy