This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v2-0-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 400e078ff4fd523354bc0a7fe664bbece324e5fa
Author: Gabriel <[email protected]>
AuthorDate: Fri Feb 12 01:09:20 2021 +0800

    Update documents for using MySQL (#14174)
    
    Co-authored-by: Jarek Potiuk <[email protected]>
    Co-authored-by: Kamil BreguĊ‚a <[email protected]>
    (cherry picked from commit a3b9f1e489129c197f1cab1b01768b1affe08d2e)
---
 docs/apache-airflow/howto/set-up-database.rst | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/docs/apache-airflow/howto/set-up-database.rst 
b/docs/apache-airflow/howto/set-up-database.rst
index b13fdc4..3afdff1 100644
--- a/docs/apache-airflow/howto/set-up-database.rst
+++ b/docs/apache-airflow/howto/set-up-database.rst
@@ -67,7 +67,7 @@ In the example below, a database ``airflow_db`` and user  
with username ``airflo
 
 .. code-block:: sql
 
-   CREATE DATABASE airflow_db CHARACTER SET utf8 COLLATE utf8_unicode_ci;
+   CREATE DATABASE airflow_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    CREATE USER 'airflow_user' IDENTIFIED BY 'airflow_pass';
    GRANT ALL PRIVILEGES ON airflow_db.* TO 'airflow_user';
 
@@ -91,6 +91,8 @@ without any cert options provided.
 However if you want to use other drivers visit the `MySQL Dialect 
<https://docs.sqlalchemy.org/en/13/dialects/mysql.html>`__  in SQLAlchemy 
documentation for more information regarding download
 and setup of the SqlAlchemy connection.
 
+In addition, you also should pay particular attention to MySQL's encoding. 
Although the ``utf8mb4`` character set is more and more popular for MySQL 
(actually, ``utf8mb4`` becomes default character set in MySQL8.0), using the 
``utf8mb4`` encoding requires additional setting in Airflow 2+ (See more 
details in `#7570 <https://github.com/apache/airflow/pull/7570>`__.). If you 
use ``utf8mb4`` as character set, you should also set 
``sql_engine_collation_for_ids=utf8mb3_general_ci``.
+
 Setting up a PostgreSQL Database
 --------------------------------
 

Reply via email to