def METHOD_NAME(self):
    # Makes connection with MySQL server
    try:
        if os.path.exists('/etc/mysql/conf.d/my.cnf'):
            connection = pymysql.METHOD_NAME(
                read_default_file='/etc/mysql/conf.d/my.cnf')
        else:
            connection = pymysql.METHOD_NAME(read_default_file='~/.my.cnf')
        return connection
    except ValueError as e:
        Log.debug(self, str(e))
        raise MySQLConnectionError
    except pymysql.err.InternalError as e:
        Log.debug(self, str(e))
        raise MySQLConnectionError