mirror of
https://github.com/hassio-addons/addon-phpmyadmin.git
synced 2025-05-03 18:41:20 +00:00
Fix MySQL commands (#225)
This commit is contained in:
parent
9a989d7015
commit
cda68af41d
2 changed files with 7 additions and 2 deletions
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"todo-tree.tree.scanMode": "workspace"
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue