mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-12-23 06:49:34 +01:00
Added posibility for custom SQL scripts during DB init
This commit is contained in:
parent
6803f0a8bd
commit
afb2857d03
@ -296,7 +296,7 @@ create_db_database_mysql() {
|
||||
|
||||
if [ -z ${DB_EXISTS} ]; then
|
||||
echo "** Database '${DB_SERVER_DBNAME}' does not exist. Creating..."
|
||||
mysql_query "CREATE DATABASE ${DB_SERVER_DBNAME} CHARACTER SET utf8mb4 COLLATE utf8mb4_bin" 1>/dev/null
|
||||
mysql_query "CREATE DATABASE ${DB_SERVER_DBNAME} CHARACTER SET ${DB_CHARACTER_SET} COLLATE ${DB_CHARACTER_COLLATE}" 1>/dev/null
|
||||
# better solution?
|
||||
mysql_query "GRANT ALL PRIVILEGES ON $DB_SERVER_DBNAME. * TO '${DB_SERVER_ZBX_USER}'@'%'" 1>/dev/null
|
||||
else
|
||||
|
@ -293,7 +293,7 @@ create_db_database_mysql() {
|
||||
|
||||
if [ -z ${DB_EXISTS} ]; then
|
||||
echo "** Database '${DB_SERVER_DBNAME}' does not exist. Creating..."
|
||||
mysql_query "CREATE DATABASE ${DB_SERVER_DBNAME} CHARACTER SET utf8mb4 COLLATE utf8mb4_bin" 1>/dev/null
|
||||
mysql_query "CREATE DATABASE ${DB_SERVER_DBNAME} CHARACTER SET ${DB_CHARACTER_SET} COLLATE ${DB_CHARACTER_COLLATE}" 1>/dev/null
|
||||
# better solution?
|
||||
mysql_query "GRANT ALL PRIVILEGES ON $DB_SERVER_DBNAME. * TO '${DB_SERVER_ZBX_USER}'@'%'" 1>/dev/null
|
||||
else
|
||||
|
@ -293,7 +293,7 @@ create_db_database_mysql() {
|
||||
|
||||
if [ -z ${DB_EXISTS} ]; then
|
||||
echo "** Database '${DB_SERVER_DBNAME}' does not exist. Creating..."
|
||||
mysql_query "CREATE DATABASE ${DB_SERVER_DBNAME} CHARACTER SET utf8mb4 COLLATE utf8mb4_bin" 1>/dev/null
|
||||
mysql_query "CREATE DATABASE ${DB_SERVER_DBNAME} CHARACTER SET ${DB_CHARACTER_SET} COLLATE ${DB_CHARACTER_COLLATE}" 1>/dev/null
|
||||
# better solution?
|
||||
mysql_query "GRANT ALL PRIVILEGES ON $DB_SERVER_DBNAME. * TO '${DB_SERVER_ZBX_USER}'@'%'" 1>/dev/null
|
||||
else
|
||||
|
@ -293,7 +293,7 @@ create_db_database_mysql() {
|
||||
|
||||
if [ -z ${DB_EXISTS} ]; then
|
||||
echo "** Database '${DB_SERVER_DBNAME}' does not exist. Creating..."
|
||||
mysql_query "CREATE DATABASE ${DB_SERVER_DBNAME} CHARACTER SET utf8mb4 COLLATE utf8mb4_bin" 1>/dev/null
|
||||
mysql_query "CREATE DATABASE ${DB_SERVER_DBNAME} CHARACTER SET ${DB_CHARACTER_SET} COLLATE ${DB_CHARACTER_COLLATE}" 1>/dev/null
|
||||
# better solution?
|
||||
mysql_query "GRANT ALL PRIVILEGES ON $DB_SERVER_DBNAME. * TO '${DB_SERVER_ZBX_USER}'@'%'" 1>/dev/null
|
||||
else
|
||||
|
@ -293,7 +293,7 @@ create_db_database_mysql() {
|
||||
|
||||
if [ -z ${DB_EXISTS} ]; then
|
||||
echo "** Database '${DB_SERVER_DBNAME}' does not exist. Creating..."
|
||||
mysql_query "CREATE DATABASE ${DB_SERVER_DBNAME} CHARACTER SET utf8mb4 COLLATE utf8mb4_bin" 1>/dev/null
|
||||
mysql_query "CREATE DATABASE ${DB_SERVER_DBNAME} CHARACTER SET ${DB_CHARACTER_SET} COLLATE ${DB_CHARACTER_COLLATE}" 1>/dev/null
|
||||
# better solution?
|
||||
mysql_query "GRANT ALL PRIVILEGES ON $DB_SERVER_DBNAME. * TO '${DB_SERVER_ZBX_USER}'@'%'" 1>/dev/null
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user