Maybe this helps ? https://php.watch/articles/fix-php-mysql-84-mysql_native_password-not-loaded
On Mon, Oct 7, 2024, 4:56 PM Tim Lank <timl...@timlank.com> wrote: > Apache::DBI experts: > > I have the following in my startup.pl: > > use CGI qw(:all); > use CGI::Carp 'fatalsToBrowser', 'carpout'; > use List::Util 'shuffle'; > CGI->compile(':all'); > Apache::DBI->connect_on_init > ("DBI:mysql:holidayshop", > "dba", > "theactualpw", > { > PrintError => 1, # warn() on errors > RaiseError => 0, # don't die on error > AutoCommit => 1, # commit executes immediately > } > ); > $Apache::DBI::DEBUG = 0; > 1; > > mysql> SHOW VARIABLES LIKE 'wait_%'; > +---------------+-------+ > | Variable_name | Value | > +---------------+-------+ > | wait_timeout | 300 | (I have set this to 172800 as well, but it > somehow doesn't stick) > +---------------+-------+ > 1 row in set (0.01 sec) > > mysql> SHOW global VARIABLES LIKE 'wait_%'; > +---------------+--------+ > | Variable_name | Value | > +---------------+--------+ > | wait_timeout | 172800 | > +---------------+--------+ > 1 row in set (0.00 sec) > > mysql> SHOW session VARIABLES LIKE 'wait_%'; > +---------------+-------+ > | Variable_name | Value | > +---------------+-------+ > | wait_timeout | 300 | (I have set this to 172800 as well, but it > somehow doesn't stick) > +---------------+-------+ > 1 row in set (0.00 sec) > > > I am load testing by sending about 300 page requests that utilize the > database every minute or so for the period of an hour. > > Consistently I see about 6-8 occurrences of the following error in my > Apache error log for the hour no matter what I seem to do: > > -e: DBI connect('holidayshop','dba',...) failed: Authentication plugin > 'mysql_native_password' cannot be loaded: not initialized at > /var/www/holidayshop/perl/validatephone.pl line 16. > > The actual line #16 in the code is: > > my $logdb = DBI->connect('DBI:mysql:holidayshop', 'dba', 'theactualpw'); > > Hundreds of thousands of connections occur either outright or out of cache > without error and work just fine. The only problem is these 6-8 errors in > the log. > > Can someone clue me in on what to do in order to try and eliminate any of > the errors from happening when doing a load test like this? > > Server Version: Apache/2.4.57 (AlmaLinux) OpenSSL/3.0.7 mod_perl/2.0.12 > Perl/v5.32.1Server MPM: eventServer version: 8.0.39 MySQL Community > Server - GPL > > Thanks,Tim >