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
code: def _get_conn_config_mysql_client(self, conn: Connection) -> dict:
      conn_config = {
          "user": conn.login,
          "passwd": conn.password or "",
          "host": conn.host or "localhost",
          "db": self.schema or conn.schema or "",
      }
  
      # check for authentication via AWS IAM
      if conn.extra_dejson.get("iam", False):
          conn_config["passwd"], conn.port = self.get_iam_token(conn)
          conn_config["read_default_group"] = "enable-cleartext-plugin"
  
      conn_config["port"] = int(conn.port) if conn.port else 3306
  
      if conn.extra_dejson.get("charset", False):
          conn_config["charset"] = conn.extra_dejson["charset"]
          if conn_config["charset"].lower() in ("utf8", "utf-8"):
              conn_config["use_unicode"] = True
      if conn.extra_dejson.get("cursor", False):
          import MySQLdb.cursors
  
          if (conn.extra_dejson["cursor"]).lower() == "sscursor":
              conn_config["cursorclass"] = MySQLdb.cursors.SSCursor
          elif (conn.extra_dejson["cursor"]).lower() == "dictcursor":
              conn_config["cursorclass"] = MySQLdb.cursors.DictCursor
          elif (conn.extra_dejson["cursor"]).lower() == "ssdictcursor":
              conn_config["cursorclass"] = MySQLdb.cursors.SSDictCursor
      if conn.extra_dejson.get("ssl", False):
          # SSL parameter for MySQL has to be a dictionary and in case
          # of extra/dejson we can get string if extra is passed via
          # URL parameters
          dejson_ssl = conn.extra_dejson["ssl"]
          if isinstance(dejson_ssl, str):
              dejson_ssl = json.loads(dejson_ssl)
          conn_config["ssl"] = dejson_ssl
      if conn.extra_dejson.get("ssl_mode", False):
          conn_config["ssl_mode"] = conn.extra_dejson["ssl_mode"]
      if conn.extra_dejson.get("unix_socket"):
          conn_config["unix_socket"] = conn.extra_dejson["unix_socket"]
      if self.local_infile:
          conn_config["local_infile"] = 1
      if self.init_command:
          conn_config["init_command"] = self.init_command
      return conn_config
  
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 4 for calling the MySqlHook obj's underlying member method code with example usage: obj._get_conn_config_mysql_client(conn) and returns: conn_config