MariaDB / mariadb-docker

Docker Official Image packaging for MariaDB
https://mariadb.org
GNU General Public License v2.0
770 stars 438 forks source link

Unable to run the mariadb while using some of the config options #351

Closed joseims closed 3 years ago

joseims commented 3 years ago

Im running this command to start the MariaDB

 -p 127.0.0.1:3306:3306 \
 -v $(pwd)/conf.cnf:/etc/mysql/mariadb.conf.d/100.cnf \
 -e MYSQL_ROOT_PASSWORD=mypass \
-d mariadb

When i use this config file(conf.cnf) everything works properly:

[client-server]
#ssl_cert = /certificates/server.cert
#ssl_key = /certificates/server.key.rsa
#ssl_ca = /certificates/ca.cert
#require-secure-transport = on
connect_timeout=11
#log_warnings=12

But when i uncomment the log_warning variable it doesn't work

[client-server]
#ssl_cert = /certificates/server.cert
#ssl_key = /certificates/server.key.rsa
#ssl_ca = /certificates/ca.cert
#require-secure-transport = on
connect_timeout=11
log_warnings=12

and this errors is presented:

2021-03-03 16:33:21+00:00 [Note] [Entrypoint]: Starting temporary server
2021-03-03 16:33:21+00:00 [Note] [Entrypoint]: Waiting for server startup
2021-03-03 16:33:22 0 [Note] mysqld (mysqld 10.5.9-MariaDB-1:10.5.9+maria~focal) starting as process 97 ...
2021-03-03 16:33:22 0 [Note] Initializing built-in plugins
2021-03-03 16:33:22 0 [Note] Initializing plugins specified on the command line
2021-03-03 16:33:22 0 [Note] InnoDB: Uses event mutexes
2021-03-03 16:33:22 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-03-03 16:33:22 0 [Note] InnoDB: Number of pools: 1
2021-03-03 16:33:22 0 [Note] InnoDB: Using SSE4.2 crc32 instructions
2021-03-03 16:33:22 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2021-03-03 16:33:22 0 [Note] InnoDB: Using Linux native AIO
2021-03-03 16:33:22 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2021-03-03 16:33:22 0 [Note] InnoDB: Completed initialization of buffer pool
2021-03-03 16:33:22 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-03-03 16:33:22 0 [Note] InnoDB: 128 rollback segments are active.
2021-03-03 16:33:22 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-03-03 16:33:22 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-03-03 16:33:22 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2021-03-03 16:33:22 0 [Note] InnoDB: 10.5.9 started; log sequence number 45106; transaction id 20
2021-03-03 16:33:22 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-03-03 16:33:22 0 [Note] Initializing installed plugins
2021-03-03 16:33:22 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2021-03-03 16:33:22 0 [Note] InnoDB: Buffer pool(s) load completed at 210303 16:33:22
2021-03-03 16:33:22 0 [Warning] 'user' entry 'root@b6efc55bf8c0' ignored in --skip-name-resolve mode.
2021-03-03 16:33:22 0 [Warning] 'proxies_priv' entry '@% root@b6efc55bf8c0' ignored in --skip-name-resolve mode.
2021-03-03 16:33:22 0 [Note] mysqld: File './ddl_log.log' not found (Errcode: 2 "No such file or directory")
2021-03-03 16:33:22 0 [Note] Reading of all Master_info entries succeeded
2021-03-03 16:33:22 0 [Note] Added new Master_info '' to hash table
2021-03-03 16:33:22 0 [Note] mysqld: ready for connections.
Version: '10.5.9-MariaDB-1:10.5.9+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
2021-03-03 16:33:53+00:00 [ERROR] [Entrypoint]: Unable to start server.

My final goal is to use TLS, but the same error is presented when i uncomment the TLS parameters, so the cause is probably the same

grooverdan commented 3 years ago

Because log-warnings is in [client-server] group it is read by the mariadb client mysql. The mariadb client is used to check the MariaDB server is running. The mariadb client doesn't understand log-warnings and errors, in the same was as it it failed a connection.

So to fix, put log-warnings in a [server] (or equivalent) group (same file is ok).