Closed benscha closed 6 years ago
$dbhost = 'localhost'; # Set the hostname if we can't connect to the local socket.
if you use 'localhost' the perl units will connect through the local socket ('/var/run/mysqld/mysqld.sock' in your case). the mysql will always connect through port. So check the socket is it present and are the file rights correct.
thx for this SUPERFAST Solution! that fix did it!
@techsneeze or @benscha - can you close this?
Hi techsneeze
i have some issues with the script. my DB is working and i can connect with my credentials.
mysql -h localhost -u dmarc -p dmarc
if i run the script like this
./dmarcts-report-parser.pl -x /tmp/dmarc/emailsrvr.com\!domain.com\!1531094400\!1531180800\!5074c731-3737-4597-8977-5af1717fb902.xml
i receive the following error:
DBI connect('database=dmarc;host=localhost','dmarc',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at ./dmarcts-report-parser.pl line 220.
this is the content of my dmarcts-report-parser.conf
do you have any hints for me, where the misconfig could be?
thx