question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Documentation is missing instructions for preparing database for Airflow (during installation)

See original GitHub issue

Apache Airflow version: 1.10.11

Kubernetes version (if you are using kubernetes) (use kubectl version): N/A

Environment:

  • Cloud provider or hardware configuration: AWS
  • OS (e.g. from /etc/os-release): Amazon Linux 2
  • Kernel (e.g. uname -a): N/A
  • Install tools: N/A
  • Others: N/A

What happened: Airflow documentation is missing a step – preparing the database for Airflow initdb.

This includes creating the “airflow” database, and the “airflow” user.

There are multiple different instructions for it outside the documentation, e.g.:

https://medium.com/@srivathsankr7/apache-airflow-a-practical-guide-5164ff19d18b says:

mysql -u root -p
mysql> CREATE DATABASE airflow CHARACTER SET utf8 COLLATE utf8_unicode_ci;
mysql> create user 'airflow'@'localhost' identified by 'airflow';
mysql> grant all privileges on * . * to 'airflow'@'localhost';
mysql> flush privileges;

http://site.clairvoyantsoft.com/installing-and-configuring-apache-airflow/ says:

CREATE DATABASE airflow CHARACTER SET utf8 COLLATE utf8_unicode_ci;
grant all on airflow.* TO ‘USERNAME'@'%' IDENTIFIED BY ‘{password}';

https://airflow-tutorial.readthedocs.io/en/latest/first-airflow.html says:

MySQL -u root -p
mysql> CREATE DATABASE airflow CHARACTER SET utf8 COLLATE utf8_unicode_ci;
mysql> GRANT ALL PRIVILEGES ON airflow.* To 'airflow'@'localhost';
mysql> FLUSH PRIVILEGES;

(This last one seems to be missing the step of creating the airflow user.)

What you expected to happen:

I would expect https://airflow.apache.org/docs/stable/howto/initialize-database.html to contain complete instructions for preparing the database backend for initialization.

How to reproduce it:

Try to install Airflow with a MySQL backend with no prior knowledge by following the Airflow documentation.

Anything else we need to know:

Airflow rocks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:22 (21 by maintainers)

github_iconTop GitHub Comments

2reactions
mik-lajcommented, Aug 19, 2020

Thanks for your feedback. Wouldn’t you like to contribute this documentation change? You can do it even using Github UI. https://docs.github.com/en/github/managing-files-in-a-repository/editing-files-in-your-repository I am very happy to help with the review of this change.

1reaction
mik-lajcommented, Aug 19, 2020

pre-commit is optional. For small changes to the documentation, I very often post the changes without pre-commit to the CI. When an error occurs, I apply the correction locally and send the change again to CI. This is also the reason why I recommended editing the documentation via Github UI.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation — Airflow Documentation
Installation script. Python versions support. Set up a database. Troubleshooting. Airflow command is not recognized. Symbol not found: _Py_GetArgcArgv.
Read more >
First install of Apache Airflow fails - missing Python.h
The installation instructions for Airflow using Postgres as a backend are incorrect. The Apache Airflow documentation is not clear on how to get ......
Read more >
Installing and Configuring Apache Airflow - Home - Clairvoyant
Configuring Airflow · Login to the mysql machine · Create the airflow database if it doesn't exist. CREATE DATABASE airflow CHARACTER SET utf8 ......
Read more >
DAGs, Operators, Connections, and other issues in Apache ...
Describes common errors and resolutions to Apache Airflow v2 Python dependencies, custom plugins, DAGs, Operators, Connections, tasks, and Web server errors ...
Read more >
Troubleshooting environment creation | Cloud Composer
Errors in: [Web server]; Error messages: Creation of airflow web server version failed. This may be an intermittent issue of the App Engine...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found