test connection with mysql and print the error if the connection is not correct