potiuk commented on a change in pull request #10413:
URL: https://github.com/apache/airflow/pull/10413#discussion_r479657692



##########
File path: docs/howto/initialize-database.rst
##########
@@ -48,11 +48,46 @@ SqlAlchemy backend. We recommend using **MySQL** or 
**Postgres**.
    want to set a default schema for your role with a
    command similar to ``ALTER ROLE username SET search_path = airflow, 
foobar;``
 
+Setup your database to host Airflow
+-----------------------------------
+
+Create a database called ``airflow`` and a database user that Airflow
+will use to access this database.
+
+Example, for **MySQL**:
+
+.. code-block:: sql
+   CREATE DATABASE airflow CHARACTER SET utf8_mb3 COLLATE utf8_unicode_ci;
+   CREATE USER 'airflow' IDENTIFIED BY 'airflow';
+   GRANT ALL PRIVILEGES ON airflow.* TO 'airflow';
+

Review comment:
       ```suggestion
   
   
   If you would like to use `utf8mb4` encoding, you need to add an additional 
configuration option `sql_engine_collation_for_ids` set to `utf8mb3_general_ci` 
- otherwise index sizes of some Airflow tables will exceed maximum index size 
allowed in MySQL.
   
   ```
   
   I still we need to add this :).




----------------------------------------------------------------
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.

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


Reply via email to