Closed MartinMuzatko closed 4 years ago
Hello! When inserting data via the entrypoint, there is no database selected by default, while I define my env var for MYSQL_DATABASE.
MYSQL_DATABASE
Affected line: https://github.com/yobasystems/alpine-mariadb/blob/master/alpine-mariadb-armhf/files/run.sh#L70
I am not sure where the official images does that differently, since this is only echoed there: https://github.com/docker-library/mariadb/blob/master/docker-entrypoint.sh#L178
sicon_db | /scripts/run.sh: running /docker-entrypoint-initdb.d/c-db_initialized.sql sicon_db | 2019-05-07 9:44:39 0 [Note] /usr/bin/mysqld (mysqld 10.3.13-MariaDB) starting as process 164 ... sicon_db | 2019-05-07 9:44:39 0 [Note] InnoDB: Using Linux native AIO sicon_db | 2019-05-07 9:44:39 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins sicon_db | 2019-05-07 9:44:39 0 [Note] InnoDB: Uses event mutexes sicon_db | 2019-05-07 9:44:39 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 sicon_db | 2019-05-07 9:44:39 0 [Note] InnoDB: Number of pools: 1 sicon_db | 2019-05-07 9:44:39 0 [Note] InnoDB: Using SSE2 crc32 instructions sicon_db | 2019-05-07 9:44:39 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M sicon_db | 2019-05-07 9:44:39 0 [Note] InnoDB: Completed initialization of buffer pool sicon_db | 2019-05-07 9:44:39 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). sicon_db | 2019-05-07 9:44:39 0 [Note] InnoDB: 128 out of 128 rollback segments are active. sicon_db | 2019-05-07 9:44:39 0 [Note] InnoDB: Creating shared tablespace for temporary tables sicon_db | 2019-05-07 9:44:39 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... sicon_db | 2019-05-07 9:44:39 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. sicon_db | 2019-05-07 9:44:39 0 [Note] InnoDB: Waiting for purge to start sicon_db | 2019-05-07 9:44:39 0 [Note] InnoDB: 10.3.13 started; log sequence number 1630842; transaction id 21 sicon_db | 2019-05-07 9:44:39 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool sicon_db | 2019-05-07 9:44:40 0 [Note] InnoDB: Buffer pool(s) load completed at 190507 9:44:40 sicon_db | 2019-05-07 9:44:40 0 [Note] Plugin 'FEEDBACK' is disabled. sicon_db | ERROR: 1046 No database selected sicon_db | 2019-05-07 9:44:40 0 [ERROR] Aborting sicon_db |
USE
Hello! When inserting data via the entrypoint, there is no database selected by default, while I define my env var for
MYSQL_DATABASE
.Affected line: https://github.com/yobasystems/alpine-mariadb/blob/master/alpine-mariadb-armhf/files/run.sh#L70
I am not sure where the official images does that differently, since this is only echoed there: https://github.com/docker-library/mariadb/blob/master/docker-entrypoint.sh#L178
Log
Workaround - add a
USE
statement for my own entrypoint files.