in reply to Re: DBI Connection failed
in thread DBI Connection failed

In addition to this general debugging advice, I would first check whether the error message really does not apply.

If MySQL claims that the user koha_library is using an invalid password for the connection, then maybe the password is the wrong MySQL password for this user?

This is something only the OP can check (and double-check).

Replies are listed 'Best First'.
Re^3: DBI Connection failed
by thanos1983 (Parson) on Mar 25, 2019 at 10:15 UTC

    Hello again Anonymous Monk,

    What fellow Monk Corion is raising is a very valid point. Have you checked if manually you can connect to the DB with the same credentials that you are using on your script? Sample from the official documentation (4.2.2 Connecting to the MySQL Server) see below:

    mysql -h localhost -u myname -ppassword mydb

    Can you check manually and let us know if the problem still exists with your username and password? Another possibility is that you are trying to pass special characters into your username / password and they are not processed correctly. For example characters as: @ or | and many others. If this is the case you can use the module quotemeta which will do the work for you.

    For example:

    #!/usr/bin/perl use strict; use warnings; use feature 'say'; my $mySpecialChar = q(@|); say $mySpecialChar; my $quotedSpecialChar = quotemeta $mySpecialChar; say $quotedSpecialChar; __END__ perl test.pl @| \@\|

    Hope this helps, BR.

    Seeking for Perl wisdom...on the process of learning...not there...yet!