potiuk commented on issue #19104:
URL: https://github.com/apache/airflow/issues/19104#issuecomment-953110373


   Ah sorry @Bowrna - I missed the earlier comment :( 
   
   This is not what I see in my case. This is rather strange - in my case when 
I enter the db shell I see clearly that both global and local varable for it 
are set to ON:
   
   ```
   mysql> show variables like '%timestamp%';
   +---------------------------------+-------------------+
   | Variable_name                   | Value             |
   +---------------------------------+-------------------+
   | explicit_defaults_for_timestamp | ON                |
   | log_timestamps                  | UTC               |
   | timestamp                       | 1635352420.514202 |
   +---------------------------------+-------------------+
   3 rows in set (0.00 sec)
   
   mysql> show global variables like '%timestamp%';
   +---------------------------------+-------+
   | Variable_name                   | Value |
   +---------------------------------+-------+
   | explicit_defaults_for_timestamp | ON    |
   | log_timestamps                  | UTC   |
   +---------------------------------+-------+
   2 rows in set (0.01 sec)
   ```
   
   NOTE: the easiest way to get to the shell of your db is `airflow db shell` 
command line in `breeze` - it drops you directly in the shell of the DB that is 
configured for Airflow (this is what I did).
   
   I suggest that you `./breeze stop` `./breeze start --backend mysql` and see 
if it is "OFF" - both with `airflow db shell` and with your client. It could be 
(though it is highly unlikely) that your client does not see this option (but 
that would be strange). Nore likely you connect to a different DB than you 
think (might happen with port forwarding)..
   
   Another reason which I think of - the mysql database get their configuration 
via this file: 
https://github.com/apache/airflow/blob/main/scripts/ci/mysql/conf.d/airflow.cnf 
   
   It is mounted by Breeze automaticaly in the mysql docker container when it 
starts: 
https://github.com/apache/airflow/blob/main/scripts/ci/docker-compose/backend-mysql.yml#L36
 - maybe for some reason this file is somehow modified by you or otherwise 
deleted? You could run `docker exec -it <mysql_container_id> /bin/bash` to 
enter the mysql container and check if the `/etc/mysql/conf.d` is properly 
mounted there - maybe there is another reason (due to the environment/docker 
setup of yours) that it is not properly mounted. 
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to