After uninstall and reinstall, the problem returns:
Mar 13 10:22:32 xxxx amavis[248377]: (248377-01) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=emailsecurity;mysql_socket=/var/run/mysqld/mysqld.sock': Can't connect to local server through socket...
I currently have Roundcube 1.6.1 (Release Roundcube Webmail 1.6.1 · roundcube/roundcubemail) installed, which can be downloaded at https://github.com/roundcube/roundcubemail/releases/download/1.6.1/roundcubemail-1.6.1-complete.tar.gz
My server has CentOS Linux 7.9.2009 with Plesk Obsidian...
I have updated Rouncube manually to 1.6.0 on CentOS 7 and everything has been working correctly until a moment later when sending errors appeared due to SMTP authentication problems. I had to revert the version to the one included with Plesk to recover the functionality.