From 4e2f9e035970cba2bb7e0c7ab9031013e6e064ae Mon Sep 17 00:00:00 2001 From: Brian Mesick Date: Wed, 11 Oct 2023 09:51:55 -0400 Subject: [PATCH] fix: Make the Superset MySQL database utf8mb4 --- tutoraspects/templates/aspects/jobs/init/init-mysql.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutoraspects/templates/aspects/jobs/init/init-mysql.sh b/tutoraspects/templates/aspects/jobs/init/init-mysql.sh index 1fc89c05b..f162f85b9 100644 --- a/tutoraspects/templates/aspects/jobs/init/init-mysql.sh +++ b/tutoraspects/templates/aspects/jobs/init/init-mysql.sh @@ -14,8 +14,8 @@ do done echo "MySQL is up and running" -# edx-platform database -mysql -u {{ MYSQL_ROOT_USERNAME }} --password="{{ MYSQL_ROOT_PASSWORD }}" --host "{{ MYSQL_HOST }}" --port {{ MYSQL_PORT }} -e "CREATE DATABASE IF NOT EXISTS {{ SUPERSET_DB_NAME }};" +# Superset MySQL database, by default points to the same host as edx-platform +mysql -u {{ MYSQL_ROOT_USERNAME }} --password="{{ MYSQL_ROOT_PASSWORD }}" --host "{{ MYSQL_HOST }}" --port {{ MYSQL_PORT }} -e "CREATE DATABASE IF NOT EXISTS {{ SUPERSET_DB_NAME }} /*!40100 DEFAULT CHARACTER SET utf8mb4 */;" mysql -u {{ MYSQL_ROOT_USERNAME }} --password="{{ MYSQL_ROOT_PASSWORD }}" --host "{{ MYSQL_HOST }}" --port {{ MYSQL_PORT }} -e "CREATE USER IF NOT EXISTS '{{ SUPERSET_DB_USERNAME }}';" mysql -u {{ MYSQL_ROOT_USERNAME }} --password="{{ MYSQL_ROOT_PASSWORD }}" --host "{{ MYSQL_HOST }}" --port {{ MYSQL_PORT }} -e "ALTER USER '{{ SUPERSET_DB_USERNAME }}'@'%' IDENTIFIED BY '{{ SUPERSET_DB_PASSWORD }}';" mysql -u {{ MYSQL_ROOT_USERNAME }} --password="{{ MYSQL_ROOT_PASSWORD }}" --host "{{ MYSQL_HOST }}" --port {{ MYSQL_PORT }} -e "GRANT ALL ON {{ SUPERSET_DB_NAME }}.* TO '{{ SUPERSET_DB_USERNAME }}'@'%';"