Feedwriter can't connect to MySQL


I was with version 9.8.30 and since both “Update Pi” and “Create Backup” were not working I managed to update emoncms+pi via ssh.

Now both seem to be working fine under 9.8.31 but the feeds list is stuck loading forever (the circular icon never goes away).
I’m able to open the json version of the view (/emoncms/feed/list.json) and see the data directly (e.g. (emoncms/vis/auto?feedid=1). I’m also able to connect to mysql via ssh with the default credentials (from settings.php) and emoncms is working fine so it obviously can connect to mysql.

It seems that feedwriter.php is not able to connect to mysql tho:

2018-08-15 17:03:32.171|ERROR|feedwriter.php|Can’t connect to database:Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

Any idea why? I’ve restarted both mysql and feedwriter, tried updating Pi again and can’t seem to solve it. As a final note, the settings.php have been “autoupdated” with the update but they seem all to be ok (and I don’t have the previous setttings.php file to compare).