[rt-users] Vintage upgrade fails
Alex Peters
alex at peters.net
Thu Jul 24 10:05:31 EDT 2014
I've just realised that RT will be using a default password of "rt_pass" in
some cases.
Try additionally setting the RT_DB_PASSWORD environment variable before
running the script.
Alternatively, create an RT_SiteConfig.pm file in the etc directory of your
upgrade containing all of the necessary database configuration details.
On 24 July 2014 23:54, "Tamás, Szép" <tamas.szep at govcert.hu> wrote:
> Everything seems to work smoothly:
>
> root at ubuntu:/# mysql -u root -p
> Enter password:
> Welcome to the MySQL monitor. Commands end with ; or \g.
> Your MySQL connection id is 53
> Server version: 5.5.38-0ubuntu0.12.04.1 (Ubuntu)
>
> -----blablabla-----
>
> mysql> show databases;
> +--------------------+
> | Database |
> +--------------------+
> | information_schema |
> | mysql |
> | performance_schema |
> | rt3 |
> | rt4 |
> +--------------------+
> 5 rows in set (0.00 sec)
>
> mysql> use rt4;
> Reading table information for completion of table and column names
> You can turn off this feature to get a quicker startup with -A
>
> Database changed
> mysql> show tables;
> +-------------------------+
> | Tables_in_rt4 |
> +-------------------------+
> | ACL |
> | Attachments |
> | Attributes |
> | CachedGroupMembers |
> | CustomFieldValues |
> | CustomFields |
> | GroupMembers |
> | Groups |
> | Links |
> | Principals |
> | Queues |
> | ScripActions |
> | ScripConditions |
> | Scrips |
> | Sessions |
> | Templates |
> | TicketCustomFieldValues |
> | Tickets |
> | Transactions |
> | Users |
> +-------------------------+
> 20 rows in set (0.00 sec)
>
>
> Before you ask: the 'rt4' database was created by me simply typing
> 'create database rt4;', because the upgrade process needs it, but it
> will not create it for you. That is why I have both 'rt3' and 'rt4'.
>
>
> on 2014.07.24. 15:43, Alex Peters wrote:
> > To me, this suggests a problem independent of RT.
> >
> > Is your database running on localhost? What happens when you try to
> > connect to the database directly with that username using a MySQL client?
> >
> >
> > On 24 July 2014 23:41, "Tamás, Szép" <tamas.szep at govcert.hu> wrote:
> >
> >> Now it says (went back to the right snapshot ofcourse):
> >>
> >> Processing 3.1.0
> >> Now populating database schema.
> >> Now inserting database ACLs.
> >> DBI connect('dbname=rt4;host=localhost','root',...) failed: Access
> >> denied for user 'root'@'localhost' (using password: YES) at
> >> /usr/local/share/perl/5.14.2/DBIx/SearchBuilder/Handle.pm line 105.
> >> Connect Failed Access denied for user 'root'@'localhost' (using
> >> password: YES)
> >> at /w/install/new/rt/sbin/../lib/RT.pm line 211.
> >>
> >> FYI: as I work in a sandbox, everything is left as it was installed: RT
> >> 3.0.12 and IR 1.0.5. Have not edit a single file and that is why it is
> >> strange to me because the upgrade should work fluently.
> >>
> >> Should I try to create the 'rt_user' DB user? I don't think that would
> >> be a solution but who knows.
> >>
> >> Tamas
> >>
> >> on 2014.07.24. 15:27, Alex Peters wrote:
> >>> RT is defaulting to database username "rt_user" because you didn't
> >> specify
> >>> the correct value when you ran the configure script.
> >>>
> >>> You can work around this by setting environment variable RT_DB_USER to
> >>> "root" before running the command:
> >>>
> >>> RT_DB_USER=root /usr/bin/perl -I/opt/rt4/local/lib -I/opt/rt4/lib
> >>> sbin/rt-setup-database --action upgrade --prompt-for-dba-password --dba
> >> root
> >>>
> >>>
> >>> On 24 July 2014 23:18, "Tamás, Szép" <tamas.szep at govcert.hu> wrote:
> >>>
> >>>> I only have one database user, the default 'root' DB user with a
> >> password.
> >>>> The command you suggested results the same error unfortunately.
> >>>> I do these in a sandbox environment so I can step back to any saved
> >>>> snapshots and try and try again. The RT4 upgrade process is done
> except
> >>>> this final one, the database upgrade.
> >>>> Any more ideas?
> >>>>
> >>>> Tamas
> >>>>
> >>>> on 2014.07.24. 14:57, Alex Peters wrote:
> >>>>> Running this step as the Unix root user should not be necessary.
> >>>>>
> >>>>> The error message is interesting, because it suggests that RT is not
> >>>>> attempting to connect to the database as the correct database user.
> >>>>>
> >>>>> Do you have two separate database user accounts set up for RT—one for
> >>>>> regular use, and one for database upgrades?
> >>>>>
> >>>>> If not, consider running the following command instead:
> >>>>>
> >>>>> /usr/bin/perl -I/opt/rt4/local/lib -I/opt/rt4/lib
> >>>>> sbin/rt-setup-database --action
> >>>>> upgrade --prompt-for-dba-password --dba XXX
> >>>>>
> >>>>> where XXX is the name of the database user.
> >>>>>
> >>>>>
> >>>>> On 24 July 2014 22:32, "Tamás, Szép" <tamas.szep at govcert.hu> wrote:
> >>>>>
> >>>>>> Hello,
> >>>>>>
> >>>>>> I try to upgrade RT 3.0.12 to RT 4.0.20. It works well until
> finally I
> >>>>>> get to the
> >>>>>> make upgrade-database
> >>>>>> command which dies. See below. I do these as root user.
> >>>>>>
> >>>>>> -----BEGIN-----
> >>>>>> root at ubuntu:/w/install/new/rt# make upgrade-database
> >>>>>>
> >>>>>> /usr/bin/perl -I/opt/rt4/local/lib -I/opt/rt4/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: -----HERE I TYPE THE DB ROOT PASSWORD-----
> >>>>>> Working with:
> >>>>>> Type: mysql
> >>>>>> Host: localhost
> >>>>>> Port:
> >>>>>> Name: rt4
> >>>>>> User: rt_user
> >>>>>> DBA: root
> >>>>>> Enter RT version you're upgrading from: 3.0.12 -----UPGRADING FROM
> >>>>>> THIS-----
> >>>>>>
> >>>>>> Going to apply following upgrades:
> >>>>>> * 3.1.0
> >>>>>> * 3.1.15
> >>>>>> -----CUT TO SHORTEN THE LIST-----
> >>>>>> * 4.0.18
> >>>>>> * 4.0.19
> >>>>>>
> >>>>>> Enter RT version if you want to stop upgrade at some point,
> >>>>>> or leave it blank if you want apply above upgrades: -----I JUST
> >> PRESS
> >>>>>> ENTER HERE-----
> >>>>>>
> >>>>>> IT'S VERY IMPORTANT TO BACK UP BEFORE THIS STEP
> >>>>>>
> >>>>>> Proceed [y/N]:y
> >>>>>> Processing 3.1.0
> >>>>>> Now populating database schema.
> >>>>>> Now inserting database ACLs.
> >>>>>> -----HERE COMES THE ERROR-----
> >>>>>> DBI connect('dbname=rt4;host=localhost','rt_user',...) failed:
> Access
> >>>>>> denied for user 'rt_user'@'localhost' (using password: YES) at
> >>>>>> /usr/local/share/perl/5.14.2/DBIx/SearchBuilder/Handle.pm line 105.
> >>>>>> Connect Failed Access denied for user 'rt_user'@'localhost' (using
> >>>>>> password: YES)
> >>>>>> at /w/install/new/rt/sbin/../lib/RT.pm line 211.
> >>>>>> make: *** [upgrade-database] Error 255
> >>>>>> -----END-----
> >>>>>>
> >>>>>> I need help. Thank you.
> >>>>>>
> >>>>>> Best regards,
> >>>>>>
> >>>>>> Tamas Szep
> >>>>>> GovCERT-Hungary
> >>>>>> --
> >>>>>> RT Training - Boston, September 9-10
> >>>>>> http://bestpractical.com/training
> >>>>>>
> >>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20140725/9fc6cb0e/attachment.htm>
More information about the rt-users
mailing list