Check MySQL connection using ping