Skip to content

Commit

Permalink
fix: Make the Superset MySQL database utf8mb4
Browse files Browse the repository at this point in the history
  • Loading branch information
bmtcril committed Oct 11, 2023
1 parent 337ca6b commit 4e2f9e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tutoraspects/templates/aspects/jobs/init/init-mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'@'%';"

0 comments on commit 4e2f9e0

Please sign in to comment.