Before you upgrade to Ghost v5.71.0 (Selfhosted only)

Yep. Also here: Ghost Update: ECONNREFUSED ::1:3306 + Error code 502 - #2 by markstos