RT4 make initdb uses wrong IP address of mysql and fails due to this

I am trying to install RT4 using Docker and “make initdb” falis. I have set the the following ./configure parameter
./configure
–disable-gpg
–disable-smime
–enable-developer
–enable-gd
–enable-graphviz
–with-db-type=mysql
–with-db-host=172.17.0.4
–with-db-port=3306
–with-db-rt-host=10.70.22.198
–with-db-rt-user=$DB_USER
–with-db-rt-pass=$DB_PASS \

as you can see the db-host is set to 172.17.0.4. When the "make initdb"command is run, it fails wiht the following message


root@b1f514f430f4:/usr/local/src/rt-4.4.2# make initdb
/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 172.17.0.4 (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:   172.17.0.4
Port:   3306
Name:   rt4
User:
DBA:    root
[85] [Thu Jan  4 13:56:10 2018] [warning]: max_allowed_packet is set to 4.0M, which limits the maximum attachment or email size that RT can process.  Consider adjusting MySQL's max_allowed_packet setting. (/usr/local/src/rt-4.4.2/sbin/../lib/RT/Handle.pm:307)
Now creating a mysql database rt4 for RT.
Done.
Now populating database schema.
Done.
Now inserting database ACLs.
[85] [Thu Jan  4 13:56:14 2018] [warning]: DatabaseUser option is not defined or empty. Skipping... (/opt/rt4/etc/acl.mysql:8)
Done.
[85] [Thu Jan  4 13:56:14 2018] [warning]: DBI connect('dbname=rt4;host=172.17.0.4;port=3306','',...) failed: Access denied for user 'root'@'172.17.0.3' (using password: NO) at /usr/share/perl5/DBIx/SearchBuilder/Handle.pm line 105. (/usr/share/perl/5.20/Carp.pm:168)
[85] [Thu Jan  4 13:56:14 2018] [critical]: Connect Failed Access denied for user 'root'@'172.17.0.3' (using password: NO)
 at /usr/local/src/rt-4.4.2/sbin/../lib/RT.pm line 220. (/usr/local/src/rt-4.4.2/sbin/../lib/RT.pm:394)
Connect Failed Access denied for user 'root'@'172.17.0.3' (using password: NO)
 at /usr/local/src/rt-4.4.2/sbin/../lib/RT.pm line 220.
Makefile:386: recipe for target 'initialize-database' failed
make: *** [initialize-database] Error 255

As you can see it uses ‘root’@‘172.17.0.3’ instead of ‘root’@‘172.17.0.4’ and it does not use the password provided

any idea, what i am doing wrong?

No. RT is using the right IP. The message Access denied for user ‘root’@‘172.17.0.3’ (using password: NO) is returned by the mysql server. It means that from 172.17.0.3 (which seems to be the container where you are installing RT) you are trying to log in as root.

Note that in mysql you may have several root users depending on the connecting host (which may contain wildcards, too).