diff --git a/fireflyiii/rootfs/etc/cont-init.d/99-run.sh b/fireflyiii/rootfs/etc/cont-init.d/99-run.sh index 1e1b8060a..a11fd0c19 100755 --- a/fireflyiii/rootfs/etc/cont-init.d/99-run.sh +++ b/fireflyiii/rootfs/etc/cont-init.d/99-run.sh @@ -105,11 +105,20 @@ case $(bashio::config 'DB_CONNECTION') in bashio::log.warning "Uninstalling the MariaDB addon will remove any data" bashio::log.info "Creating database for Firefly-iii if required" + # Create database without SSL requirement mysql \ - -u "${DB_USERNAME}" -p"${DB_PASSWORD}" \ - -h "${DB_HOST}" -P "${DB_PORT}" \ - -e "CREATE DATABASE IF NOT EXISTS \`firefly\` ;" - ;; + --skip-ssl \ + -u "${DB_USERNAME}" -p"${DB_PASSWORD}" \ + -h "${DB_HOST}" -P "${DB_PORT}" \ + -e "CREATE DATABASE IF NOT EXISTS \`firefly\`;" + + # Ensure the user does not require SSL + mysql \ + --skip-ssl \ + -u "${DB_USERNAME}" -p"${DB_PASSWORD}" \ + -h "${DB_HOST}" -P "${DB_PORT}" \ + -e "ALTER USER '${DB_USERNAME}'@'%' REQUIRE NONE;" + ;; # Use remote *)