Hi Zahid, the additional MySQL config for the timestamps should go into a config file for MySQL. By default, it is called my.cnf. But you can pass it as a cli option, when starting the mysql daemon (as cited in your message). As an option to the mysql daemon mysqld, it defines the behavior of only the mysql daemon, so you cannot set it on client side. The airflow.cfg is the wrong place. It might work, but maybe in the long run not as expected due to quirks with MySQL not following the SQL standard very closely. Best, Lars
On 22 December 2023 15:07:07 CET, Zahid Rahman <zahidr1...@gmail.com> wrote: >Hi, > >It was unclear from this page >https://airflow.apache.org/docs/apache-airflow/2.8.0/howto/set-up-database.html#setting-up-a-mysql-database >which is a link from the airflow home when airflow first started. >that I need to update the *airflow.cfg* to configure the mysql >database like so. > ># sql_alchemy_conn = sqlite:////home/zahid/airflow/airflow.db >sql_alchemy_conn = mysql+mysqldb://airflow_user:airflow_pass@localhost >:3306/airflow_db > >Perhaps you may wish to update the page. > >ALSO >I did not make any change to file "my.cnf" nor do I have one that I found >in the ~/airflow as described below. > >"We rely on more strict ANSI SQL settings for MySQL in order to have sane >defaults. Make sure to have specified explicit_defaults_for_timestamp=1 option >under [mysqld] section in your my.cnf file. You can also activate these >options with the --explicit-defaults-for-timestamp switch passed to mysqld > executable" > >This instruction did confuse me a bit at first until I took the guess to >make change in the airflow.cfg and *it worked!* > >Regards >Zahid > >http://www.frontbutton.com/ >¯\_(ツ)_/¯ >♡۶♡ ۶♡۶ > ><http://www.backbutton.co.uk>