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: Set *autocommit*.
  
  *mysqlclient* uses an *autocommit* method rather than an *autocommit*
  property, so we need to override this to support it.
  
  :param conn: connection to set autocommit setting
  :param autocommit: autocommit setting
docstr_tok: ["Set","*","autocommit","*",".","*","mysqlclient","*","uses","an","*","autocommit","*","method","rather","than","an","*","autocommit","*","property",",","so","we","need","to","override","this","to","support","it",".",":","param","conn",":","connection","to","set","autocommit","setting",":","param","autocommit",":","autocommit","setting"]
code: def set_autocommit(
      self, conn: MySQLConnectionTypes, autocommit: bool
  ) -> None:
      """
      Set *autocommit*.
  
      *mysqlclient* uses an *autocommit* method rather than an *autocommit*
      property, so we need to override this to support it.
  
      :param conn: connection to set autocommit setting
      :param autocommit: autocommit setting
      """
      if hasattr(conn.__class__, "autocommit") and isinstance(
          conn.__class__.autocommit, property
      ):
          conn.autocommit = autocommit
      else:
          conn.autocommit(autocommit)
  
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 2 for calling the MySqlHook obj's underlying member method code with example usage: obj.set_autocommit(conn, autocommit) without return types