title: Airflow Scheduler on Webserver: "The scheduler does not appear to be running" after installation
body: <p>I have installed Airflow 2.2.5 in my local VM (Oracle Virtual Box 8.6) with MySQL 8.0 as database backend and went through the installation process shown in the website (<a href="https://airflow.apache.org/docs/apache-airflow/stable/installation/index.html" rel="nofollow noreferrer">https://airflow.apache.org/docs/apache-airflow/stable/installation/index.html</a>).</p>
  <p>I am using the 'sql_alchemy_conn' argument below:</p>
  <blockquote>
  <p>mysql+mysqlconnector://airflow_user:airflow_password@localhost:3306/airflow_db</p>
  </blockquote>
  <p>I managed to install Airflow, its dependencies (at least what has been asked throughout the process) and got to a point where I can log in to the webserver. However the webserver says the scheduler is not running, as show in the picture:
  <a href="https://i.stack.imgur.com/DAr73.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DAr73.png" alt="Scheduler error in webserver" /></a></p>
  <p>When I execute &quot;airflow scheduler&quot; in the terminal, I get the following error:</p>
  <pre><code>[2022-09-14 15:43:28,943] {authentication.py:59} INFO - package: mysql.connector.plugins
  [2022-09-14 15:43:28,947] {authentication.py:60} INFO - plugin_name: mysql_native_password
  [2022-09-14 15:43:28,953] {authentication.py:64} INFO - AUTHENTICATION_PLUGIN_CLASS: MySQLNativePasswordAuthPlugin
    ____________       _____________
   ____    |__( )_________  __/__  /________      __
  ____  /| |_  /__  ___/_  /_ __  /_  __ \_ | /| / /
  ___  ___ |  / _  /   _  __/ _  / / /_/ /_ |/ |/ /
   _/_/  |_/_/  /_/    /_/    /_/  \____/____/|__/
  Traceback (most recent call last):
    File &quot;/usr/local/lib/python3.6/site-packages/mysql/connector/cursor.py&quot;, line 398, in _process_params_dict
      conv = to_mysql(conv)
    File &quot;/usr/local/lib/python3.6/site-packages/mysql/connector/conversion.py&quot;, line 194, in to_mysql
      ) from None
  TypeError: Python 'taskinstancestate' cannot be converted to a MySQL type
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py&quot;, line 1277, in _execute_context
      cursor, statement, parameters, context
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/default.py&quot;, line 608, in do_execute
      cursor.execute(statement, parameters)
    File &quot;/usr/local/lib/python3.6/site-packages/mysql/connector/cursor.py&quot;, line 541, in execute
      stmt = _bytestr_format_dict(stmt, self._process_params_dict(params))
    File &quot;/usr/local/lib/python3.6/site-packages/mysql/connector/cursor.py&quot;, line 406, in _process_params_dict
      ) from err
  mysql.connector.errors.ProgrammingError: Failed processing pyformat-parameters; Python 'taskinstancestate' cannot be converted to a MySQL type
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File &quot;/usr/local/bin/airflow&quot;, line 8, in &lt;module&gt;
      sys.exit(main())
    File &quot;/usr/local/lib/python3.6/site-packages/airflow/__main__.py&quot;, line 48, in main
      args.func(args)
    File &quot;/usr/local/lib/python3.6/site-packages/airflow/cli/cli_parser.py&quot;, line 48, in command
      return func(*args, **kwargs)
    File &quot;/usr/local/lib/python3.6/site-packages/airflow/utils/cli.py&quot;, line 92, in wrapper
      return f(*args, **kwargs)
    File &quot;/usr/local/lib/python3.6/site-packages/airflow/cli/commands/scheduler_command.py&quot;, line 75, in scheduler
      _run_scheduler_job(args=args)
    File &quot;/usr/local/lib/python3.6/site-packages/airflow/cli/commands/scheduler_command.py&quot;, line 46, in _run_scheduler_job
      job.run()
    File &quot;/usr/local/lib/python3.6/site-packages/airflow/jobs/base_job.py&quot;, line 242, in run
      session.commit()
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/session.py&quot;, line 1046, in commit
      self.transaction.commit()
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/session.py&quot;, line 504, in commit
      self._prepare_impl()
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/session.py&quot;, line 483, in _prepare_impl
      self.session.flush()
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/session.py&quot;, line 2540, in flush
      self._flush(objects)
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/session.py&quot;, line 2682, in _flush
      transaction.rollback(_capture_exception=True)
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/util/langhelpers.py&quot;, line 70, in __exit__
      with_traceback=exc_tb,
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/util/compat.py&quot;, line 182, in raise_
      raise exception
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/session.py&quot;, line 2642, in _flush
      flush_context.execute()
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/unitofwork.py&quot;, line 422, in execute
      rec.execute(self)
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/unitofwork.py&quot;, line 589, in execute
      uow,
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/persistence.py&quot;, line 245, in save_obj
      insert,
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/persistence.py&quot;, line 1136, in _emit_insert_statements
      statement, params
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py&quot;, line 1011, in execute
      return meth(self, multiparams, params)
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/sql/elements.py&quot;, line 298, in _execute_on_connection
      return connection._execute_clauseelement(self, multiparams, params)
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py&quot;, line 1130, in _execute_clauseelement
      distilled_params,
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py&quot;, line 1317, in _execute_context
      e, statement, parameters, cursor, context
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py&quot;, line 1511, in _handle_dbapi_exception
      sqlalchemy_exception, with_traceback=exc_info[2], from_=e
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/util/compat.py&quot;, line 182, in raise_
      raise exception
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py&quot;, line 1277, in _execute_context
      cursor, statement, parameters, context
    File &quot;/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/default.py&quot;, line 608, in do_execute
      cursor.execute(statement, parameters)
    File &quot;/usr/local/lib/python3.6/site-packages/mysql/connector/cursor.py&quot;, line 541, in execute
      stmt = _bytestr_format_dict(stmt, self._process_params_dict(params))
    File &quot;/usr/local/lib/python3.6/site-packages/mysql/connector/cursor.py&quot;, line 406, in _process_params_dict
      ) from err
  sqlalchemy.exc.ProgrammingError: (mysql.connector.errors.ProgrammingError) Failed processing pyformat-parameters; Python 'taskinstancestate' cannot be converted to a MySQL type
  [SQL: INSERT INTO job (dag_id, state, job_type, start_date, end_date, latest_heartbeat, executor_class, hostname, unixname) VALUES (%(dag_id)s, %(state)s, %(job_type)s, %(start_date)s, %(end_date)s, %(latest_heartbeat)s, %(executor_class)s, %(hostname)s, %(unixname)s)]
  [parameters: {'dag_id': None, 'state': &lt;TaskInstanceState.RUNNING: 'running'&gt;, 'job_type': 'SchedulerJob', 'start_date': datetime.datetime(2022, 9, 14, 18, 43, 29, 247880), 'end_date': None, 'latest_heartbeat': datetime.datetime(2022, 9, 14, 18, 43, 29, 247894), 'executor_class': 'LocalExecutor', 'hostname': 'airhost', 'unixname': 'root'}]
  (Background on this error at: http://sqlalche.me/e/13/f405)
  </code></pre>
  <p>I have been clueless about this section:</p>
  <pre><code>&quot;msql.connector.errors.ProgrammingError: Failed processing pyformat-parameters; Python 'taskinstancestate' cannot be converted to a MySQL type&quot;.
  </code></pre>
  <p>What does that mean? Any ideas? I haven't run any DAGs or built anything so far.</p>