Skip to content

Commit

Permalink
Fix MySQL commands
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed Dec 7, 2024
1 parent 9a989d7 commit 0acdca2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"todo-tree.tree.scanMode": "workspace"
}
6 changes: 4 additions & 2 deletions phpmyadmin/rootfs/etc/s6-overlay/s6-rc.d/init-phpmyadmin/run
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,19 @@ port=$(bashio::services "mysql" "port")
username=$(bashio::services "mysql" "username")

database=$(\
mysql \
mariadb \
-u "${username}" -p"${password}" \
-h "${host}" -P "${port}" \
--skip-column-names \
--skip-ssl \
-e "SHOW DATABASES LIKE 'phpmyadmin';"
)

if ! bashio::var.has_value "${database}"; then
bashio::log.info "Creating database for phpMyAdmin"
mysql \
mariadb \
-u "${username}" -p"${password}" \
-h "${host}" -P "${port}" \
--skip-ssl \
< /var/www/phpmyadmin/sql/create_tables.sql
fi

0 comments on commit 0acdca2

Please sign in to comment.