class_docstr: Interact with MySQL.
  
  You can specify charset in the extra field of your connection
  as ``{"charset": "utf8"}``. Also you can choose cursor as
  ``{"cursor": "SSCursor"}``. Refer to the MySQLdb.cursors for more details.
  
  Note: For AWS IAM authentication, use iam in the extra connection parameters
  and set it to true. Leave the password field empty. This will use the
  "aws_default" connection to get the temporary token unless you override
  in extras.
  extras example: ``{"iam":true, "aws_conn_id":"my_aws_conn"}``
  
  You can also add "local_infile" parameter to determine whether local_infile feature of MySQL client is
  going to be enabled (it is disabled by default).
  
  :param schema: The MySQL database schema to connect to.
  :param connection: The :ref:`MySQL connection id <howto/connection:mysql>` used for MySQL credentials.
  :param local_infile: Boolean flag determining if local_infile should be used
  :param init_command: Initial command to issue to MySQL server upon connection
docstr: Connection to a MySQL database.
  
  Establishes a connection to a mysql database
  by extracting the connection configuration from the Airflow connection.
  
  .. note:: By default it connects to the database via the mysqlclient library.
      But you can also choose the mysql-connector-python library which lets you connect through ssl
      without any further ssl parameters required.
  
  :return: a mysql connection object
docstr_tok: ["Connection","to","a","MySQL","database",".","Establishes","a","connection","to","a","mysql","database","by","extracting","the","connection","configuration","from","the","Airflow","connection",".","..","note",":",":","By","default","it","connects","to","the","database","via","the","mysqlclient","library",".","But","you","can","also","choose","the","mysql-connector-python","library","which","lets","you","connect","through","ssl","without","any","further","ssl","parameters","required",".",":","return",":","a","mysql","connection","object"]
code: def get_conn(self) -> MySQLConnectionTypes:
      """
      Connection to a MySQL database.
  
      Establishes a connection to a mysql database
      by extracting the connection configuration from the Airflow connection.
  
      .. note:: By default it connects to the database via the mysqlclient library.
          But you can also choose the mysql-connector-python library which lets you connect through ssl
          without any further ssl parameters required.
  
      :return: a mysql connection object
      """
      conn = self.connection or self.get_connection(
          getattr(self, self.conn_name_attr)
      )
  
      client_name = conn.extra_dejson.get("client", "mysqlclient")
  
      if client_name == "mysqlclient":
          import MySQLdb
  
          conn_config = self._get_conn_config_mysql_client(conn)
          return MySQLdb.connect(**conn_config)
  
      if client_name == "mysql-connector-python":
          try:
              import mysql.connector
          except ModuleNotFoundError:
              raise AirflowOptionalProviderFeatureException(
                  "The pip package 'mysql-connector-python' is not installed, therefore the connection "
                  "wasn't established. Please, consider using default driver or pip install the package "
                  "'mysql-connector-python'. Warning! It might cause dependency conflicts."
              )
  
          conn_config = self._get_conn_config_mysql_connector_python(
              conn
          )
          return mysql.connector.connect(**conn_config)
  
      raise ValueError("Unknown MySQL client name provided!")
  
imports: from __future__ import annotations
  import json
  import logging
  from typing import TYPE_CHECKING, Any, Union
  from airflow.exceptions import AirflowOptionalProviderFeatureException
  from airflow.providers.common.sql.hooks.sql import DbApiHook
label_desc: Use image node_id 6 for calling the MySqlHook obj's underlying member method code with example usage: obj.get_conn() and returns: MySQLdb, mysql