Documentation is missing instructions for preparing database for Airflow (during installation)
See original GitHub issueApache 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:
- Created 3 years ago
- Reactions:1
- Comments:22 (21 by maintainers)
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.
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.