[rt-users] Installation error for RT 4.2.9 - cannot initialize database

Kristan Wagner kristan.wagner at lifewireless.com
Wed Dec 10 12:14:48 EST 2014


Thanks for the suggestion. I've tried it, but unfortunately, it 
recreated the same error:
root at 10.10.10.3:/tmp/rt-4.2.9# make initialize-database
/usr/bin/perl -I/opt/rt4/local/lib -I/opt/rt4/lib sbin/rt-setup-database 
--action init --prompt-for-dba-password
In order to create or update your RT database, this script needs to 
connect to your  mysql instance on 10.20.20.5 (port '3306') as rtuser
Please specify that user's database password below. If the user has no 
database
password, just press return.

Password:
Working with:
Type:   mysql
Host:   10.20.20.5
Port:   3306
Name:   rt4
User:   rtuser
DBA:    rtuser
Now creating a mysql database rt4 for RT.
Done.
Now populating database schema.
Done.
Now inserting database ACLs.
[32233] [Wed Dec 10 16:55:31 2014] [warning]: DBD::mysql::st execute 
failed: Access denied for user 'rtuser'@'%' to database 'rt4' at 
/tmp/rt-4.2.9/sbin/../lib/RT/Handle.pm line 452. 
(/tmp/rt-4.2.9/sbin/../lib/RT/Handle.pm:452)
[32233] [Wed Dec 10 16:55:31 2014] [critical]: DBD::mysql::st execute 
failed: Access denied for user 'rtuser'@'%' to database 'rt4' at 
/tmp/rt-4.2.9/sbin/../lib/RT/Handle.pm line 452. 
(/tmp/rt-4.2.9/sbin/../lib/RT.pm:388)
DBD::mysql::st execute failed: Access denied for user 'rtuser'@'%' to 
database 'rt4' at /tmp/rt-4.2.9/sbin/../lib/RT/Handle.pm line 452.
make: *** [initialize-database] Error 255

I keep wondering why it keeps getting stuck on the step "Now inserting 
database ACLs." Are those handled differently from the previous steps or 
creating and populating the database?

For reference, here are the permissions for rtuser:
+-------------------------------------------------------------------------------------------------------+
| Grants for rtuser@%
+-------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'rtuser'@'%' IDENTIFIED BY PASSWORD '*hash'
| GRANT ALL PRIVILEGES ON `rt4`.* TO 'rtuser'@'%'
| GRANT ALL PRIVILEGES ON `rt4test`.* TO 'rtuser'@'%'
+-------------------------------------------------------------------------------------------------------+





On 12/10/2014 2:56 AM, Alex Peters wrote:
> You're doing this:
>
> # make initialize-database
>
> which is in turn running this:
>
> # /usr/bin/perl -I/opt/rt4/local/lib -I/opt/rt4/lib 
> sbin/rt-setup-database --action init --prompt-for-dba-password
>
> which is going to connect to the database as the RT "DBA user" 
> (RT_Config setting $DatabaseAdmin), which according to your pasted output:
>
> In order to create or update your RT database, this script needs to 
> connect to your  mysql instance on 10.20.20.5 (port '3306') as root
>
> is "root".
>
> Going off your RT_SiteConfig.pm snippet, you actually want to connect 
> to the database as user "rtuser".  Therefore, adding this to 
> RT_SiteConfig.pm might solve your issue:
>
> Set($DatabaseAdmin, "rtuser");


>
> On 10 December 2014 at 01:56, Kristan Wagner 
> <kristan.wagner at lifewireless.com 
> <mailto:kristan.wagner at lifewireless.com>> wrote:
>
>     I am having troubles with the database initialization, for a fresh
>     install of RT 4.2.9. The error message is: DBD::mysql::st execute
>     failed: Access denied for user 'root'@'10.10.10.3' to database
>     'rt4' at /tmp/rt-4.2.9/sbin/../lib/RT/Handle.pm line 452. make:
>     *** [initialize-database] Error 255
>
>     Here's my setup: Separate servers for the web frontend and the
>     database, both running Ubuntu 14.04. The web frontend is running
>     Apache/2.4.7 and has an IP address 10.10.10.3. The database
>     machine is running MySQL  5.5.40 and has the IP address
>     10.20.20.5.  Both of these are fresh installs, and RT is a fresh
>     install, but we plan to migrate our old RT database (3.6.5) when
>     the 4.2.9 is (eventually) running and tested.  Right now, I'm just
>     trying to get 4.2.9 going.
>
>     Here's the context for the error: I've been following the README
>     on the bestpractical website. At step 2, I ran configure with only
>     one flag,  --with-db-host=10.20.20.5. At step 4, fixdeps kept
>     claiming that MySQL was missing, so I had to install MySQL on the
>     web frontend as well, just to get it to install. At step 6a, make
>     initialize-database is failing with the following output:
>     root at 10.10.10.3/tmp/rt-4.2.9#
>     <http://root@10.10.10.3/tmp/rt-4.2.9#> make initialize-database
>     /usr/bin/perl -I/opt/rt4/local/lib -I/opt/rt4/lib
>     sbin/rt-setup-database --action init --prompt-for-dba-password
>     In order to create or update your RT database, this script needs
>     to connect to your  mysql instance on 10.20.20.5 (port '3306') 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:   10.20.20.5
>     Port:   3306
>     Name:   rt4
>     User:   rtuser
>     DBA:    root
>     Now creating a mysql database rt4 for RT.
>     Done.
>     Now populating database schema.
>     Done.
>     Now inserting database ACLs.
>     [23346] [Mon Dec  8 21:27:35 2014] [warning]: DBD::mysql::st
>     execute failed: Access denied for user 'root'@'10.10.10.3' to
>     database 'rt4' at /tmp/rt-4.2.9/sbin/../lib/RT/Handle.pm line 452.
>     (/tmp/rt-4.2.9/sbin/../lib/RT/Handle.pm:452)
>     [23346] [Mon Dec  8 21:27:35 2014] [critical]: DBD::mysql::st
>     execute failed: Access denied for user 'root'@'10.10.10.3' to
>     database 'rt4' at /tmp/rt-4.2.9/sbin/../lib/RT/Handle.pm line 452.
>     (/tmp/rt-4.2.9/sbin/../lib/RT.pm:388)
>     DBD::mysql::st execute failed: Access denied for user
>     'root'@'10.10.10.3' to database 'rt4' at
>     /tmp/rt-4.2.9/sbin/../lib/RT/Handle.pm line 452.
>     make: *** [initialize-database] Error 255
>
>     I've spent a lot of time reading forum questions about
>     mysqld.sock, but please note that there is NO mention of any
>     socket trouble in the error, so I don't think that's it. Plus,
>     it's able to get through the first two steps just fine.
>
>     Here is some of RT_SiteConfig.pm from the web frontend:
>     Set($DatabaseHost, '10.20.20.5' );
>     Set($DatabasePort, "3306");
>     Set($DatabasePassword, q{passwordhere});
>     Set($DatabaseUser, "rtuser");
>     Set($DatabaseName, q{rt4});
>
>     On the database server, here is some of my.cnf:
>     [mysqld]
>     user            = mysql
>     pid-file        = /var/run/mysqld/mysqld.pid
>     socket          = /var/run/mysqld/mysqld.sock
>     port            = 3306
>     basedir         = /usr
>     datadir         = /var/lib/mysql
>     tmpdir          = /tmp
>     lc-messages-dir = /usr/share/mysql
>     skip-external-locking
>     bind-address           = 0.0.0.0
>
>     I've already tried this using the option skip-name-resolve, but
>     that did not help.
>
>     Here are the permissions for the root user, as shown on
>     10.20.20.5's MySQL instance:
>     +------------------------------------------------------------------------------------------------------------------------+
>     | Grants for root at 10.10.10.3 <mailto:root at 10.10.10.3>
>     +------------------------------------------------------------------------------------------------------------------------+
>     | GRANT ALL PRIVILEGES ON *.* TO 'root'@'10.10.10.3' IDENTIFIED BY
>     PASSWORD '*hash'
>     | GRANT ALL PRIVILEGES ON `rt4`.* TO 'root'@'10.10.10.3'
>     +------------------------------------------------------------------------------------------------------------------------+
>
>     I've even tried creating a general root user for 'root'@'%' but
>     the same error is thrown. Any help is appreciated. Thanks.
>
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20141210/6fd48704/attachment.htm>


More information about the rt-users mailing list