<https://forums.cpanel.net/threads/unable-to-connect-to-mysql-database.396072/>
<http://schema.org/articleBody>
"I get this error, I tried with check of user permission and password in user mysql table but the error persist.\r\n\r\n\r\nroot@vps [~]# /etc/cron.hourly/modsecparse.pl\r\nDBI connect('modsec:localhost','modsec',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at /etc/cron.hourly/modsecparse.pl line 19\r\nUnable to connect to mysql database at /etc/cron.hourly/modsecparse.pl line 19."
<https://forums.cpanel.net/threads/unable-to-connect-to-mysql-database.396072/#post-1618842>