Update mysqld.class.php

check the mysql connnection before connect