fix 'Lost connection to MySQL' error