Juli-CQ opened a new issue, #36866:
URL: https://github.com/apache/airflow/issues/36866

   ### Apache Airflow version
   
   2.8.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   I am trying to install airflow, and after configure MySQL, I cannot run 
airflow db init in order to create airflow's database.
   
   ### What you think should happen instead?
   
   Looks like dataset table is not persisted in DB after -> def 
_create_dataset_table()
   
   ### How to reproduce
   
   **airflow.cfg**
   
   [database]
   # Path to the ``alembic.ini`` file. You can either provide the file path 
relative
   # to the Airflow home directory or the absolute path if it is located 
elsewhere.
   #
   # Variable: AIRFLOW__DATABASE__ALEMBIC_INI_FILE_PATH
   #
   alembic_ini_file_path = alembic.ini
   
   # The SqlAlchemy connection string to the metadata database.
   # SqlAlchemy supports many different database engines.
   # More information here:
   # 
http://airflow.apache.org/docs/apache-airflow/stable/howto/set-up-database.html#database-uri
   #
   # Variable: AIRFLOW__DATABASE__SQL_ALCHEMY_CONN
   #
   sql_alchemy_conn = mysql+mysqldb://airflow:123456@mercurio:3306/airflow
   
   # Extra engine specific keyword args passed to SQLAlchemy's create_engine, 
as a JSON-encoded value
   #
   # Example: sql_alchemy_engine_args = {"arg1": True}
   #
   # Variable: AIRFLOW__DATABASE__SQL_ALCHEMY_ENGINE_ARGS
   #
   # sql_alchemy_engine_args = 
   
   # The encoding for the databases
   #
   # Variable: AIRFLOW__DATABASE__SQL_ENGINE_ENCODING
   #
   sql_engine_encoding = utf-8
   
   # Collation for ``dag_id``, ``task_id``, ``key``, ``external_executor_id`` 
columns
   # in case they have different encoding.
   # By default this collation is the same as the database collation, however 
for ``mysql`` and ``mariadb``
   # the default is ``utf8mb3_bin`` so that the index sizes of our index keys 
will not exceed
   # the maximum size of allowed index when collation is set to ``utf8mb4`` 
variant
   # (see https://github.com/apache/airflow/pull/17603#issuecomment-901121618).
   #
   # Variable: AIRFLOW__DATABASE__SQL_ENGINE_COLLATION_FOR_IDS
   #
   # sql_engine_collation_for_ids = utf8mb3_bin
   
   # If SqlAlchemy should pool database connections.
   #
   # Variable: AIRFLOW__DATABASE__SQL_ALCHEMY_POOL_ENABLED
   #
   sql_alchemy_pool_enabled = True
   
   # The SqlAlchemy pool size is the maximum number of database connections
   # in the pool. 0 indicates no limit.
   #
   # Variable: AIRFLOW__DATABASE__SQL_ALCHEMY_POOL_SIZE
   #
   sql_alchemy_pool_size = 5
   
   # The maximum overflow size of the pool.
   # When the number of checked-out connections reaches the size set in 
pool_size,
   # additional connections will be returned up to this limit.
   # When those additional connections are returned to the pool, they are 
disconnected and discarded.
   # It follows then that the total number of simultaneous connections the pool 
will allow
   # is pool_size + max_overflow,
   # and the total number of "sleeping" connections the pool will allow is 
pool_size.
   # max_overflow can be set to ``-1`` to indicate no overflow limit;
   # no limit will be placed on the total number of concurrent connections. 
Defaults to ``10``.
   #
   # Variable: AIRFLOW__DATABASE__SQL_ALCHEMY_MAX_OVERFLOW
   #
   sql_alchemy_max_overflow = 10
   
   # The SqlAlchemy pool recycle is the number of seconds a connection
   # can be idle in the pool before it is invalidated. This config does
   # not apply to sqlite. If the number of DB connections is ever exceeded,
   # a lower config value will allow the system to recover faster.
   #
   # Variable: AIRFLOW__DATABASE__SQL_ALCHEMY_POOL_RECYCLE
   #
   sql_alchemy_pool_recycle = 1800
   
   # Check connection at the start of each connection pool checkout.
   # Typically, this is a simple statement like "SELECT 1".
   # More information here:
   # 
https://docs.sqlalchemy.org/en/14/core/pooling.html#disconnect-handling-pessimistic
   #
   # Variable: AIRFLOW__DATABASE__SQL_ALCHEMY_POOL_PRE_PING
   #
   sql_alchemy_pool_pre_ping = True
   
   # The schema to use for the metadata database.
   # SqlAlchemy supports databases with the concept of multiple schemas.
   #
   # Variable: AIRFLOW__DATABASE__SQL_ALCHEMY_SCHEMA
   #
   sql_alchemy_schema = 
   
   # Import path for connect args in SqlAlchemy. Defaults to an empty dict.
   # This is useful when you want to configure db engine args that SqlAlchemy 
won't parse
   # in connection string.
   # See 
https://docs.sqlalchemy.org/en/14/core/engines.html#sqlalchemy.create_engine.params.connect_args
   #
   # Example: sql_alchemy_connect_args = {"timeout": 30}
   #
   # Variable: AIRFLOW__DATABASE__SQL_ALCHEMY_CONNECT_ARGS
   #
   # sql_alchemy_connect_args = 
   
   # Whether to load the default connections that ship with Airflow when 
``airflow db init`` is called.
   # It's good to get started, but you probably want to set this to ``False`` 
in a production environment.
   #
   # Variable: AIRFLOW__DATABASE__LOAD_DEFAULT_CONNECTIONS
   #
   load_default_connections = True
   
   # Number of times the code should be retried in case of DB Operational 
Errors.
   # Not all transactions will be retried as it can cause undesired state.
   # Currently it is only used in ``DagFileProcessor.process_file`` to retry 
``dagbag.sync_to_db``.
   #
   # Variable: AIRFLOW__DATABASE__MAX_DB_RETRIES
   #
   max_db_retries = 3
   
   # Whether to run alembic migrations during Airflow start up. Sometimes this 
operation can be expensive,
   # and the users can assert the correct version through other means (e.g. 
through a Helm chart).
   # Accepts "True" or "False".
   #
   # Variable: AIRFLOW__DATABASE__CHECK_MIGRATIONS
   #
   check_migrations = True
   
   
   **MySQL** 
   engine set to InnoDB
   DATABASE airflow character SET UTF8mb4  _AND_ DATABASE airflow character SET 
UTF8mb3 COLLATE utf8_general_ci; (I have tried both)
   
   
   
   
   ### Operating System
   
   Ubuntu
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Other
   
   ### Deployment details
   
   Deployment in local environment 
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to