On Wednesday 24 July 2019 12:51:53 Damian wrote: > > >> @lookup_sql_dsn = ( > >> ['DBI:MariaDB:database=DB_Name;host=localhost;port=3306', 'DB_USer', > >> 'DB_User_Password'] ); > > I just realized the first difference between the two modules. With the > upper host/port combination I get > > > Connection error: port cannot be specified when host is localhost or > > embedded > Remove the ";port=3306" part if you actually use localhost.
Yea, that is truth. In MySQL world keyword "localhost" means connect via unix socket and not TCP connection to 127.0.0.1 (or ::1). Specifying TCP port for unix socket does not make any sense and is in most cases user error. So in this case DBD::MariaDB throw an configuration error. See also documentation for host/port: https://metacpan.org/pod/DBD::MariaDB#host Same applies for any MySQL software (so also for DBD::mysql). MySQL administrators should already know about this "feature". Just DBD::mysql totally ignores port argument without informing user about it, similarly like "mysql" command line tool.
