class_docstr: This handler handles connection and execution of the MySQL statements.
class_docstr_tok: ["This","handler","handles","connection","and","execution","of","the","MySQL","statements","."]
code: def connect(self):
      if self.is_connected is True:
          return self.connection
  
      config = self._unpack_config()
  
      if "conn_attrs" in self.connection_data:
          config["conn_attrs"] = self.connection_data["conn_attrs"]
  
      ssl = self.connection_data.get("ssl")
      if ssl is True:
          ssl_ca = self.connection_data.get("ssl_ca")
          ssl_cert = self.connection_data.get("ssl_cert")
          ssl_key = self.connection_data.get("ssl_key")
          config["client_flags"] = [
              mysql.connector.constants.ClientFlag.SSL
          ]
          if ssl_ca is not None:
              config["ssl_ca"] = ssl_ca
          if ssl_cert is not None:
              config["ssl_cert"] = ssl_cert
          if ssl_key is not None:
              config["ssl_key"] = ssl_key
  
      connection = mysql.connector.connect(**config)
      connection.autocommit = True
      self.is_connected = True
      self.connection = connection
      return self.connection
  
imports: from collections import OrderedDict
  import pandas
  import mysql.connector
  from urllib.parse import urlparse
  from sqlalchemy import create_engine
  from mindsdb_sql import parse_sql
  from mindsdb_sql.render.sqlalchemy_render import SqlalchemyRender
  from mindsdb_sql.parser.ast.base import ASTNode
  from mindsdb.utilities import log
  from mindsdb.integrations.libs.base import DatabaseHandler
  from mindsdb.integrations.libs.response import HandlerStatusResponse, HandlerResponse, RESPONSE_TYPE
  from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE
label_desc: Use image node_id 4 for calling the MySQLHandler obj's underlying member method code with example usage: obj.connect() and returns: self, self