linux - Percona 5.6 Docker Image cannot load my /etc/mysql/conf.d/*.cnf -


i struggling on issue @ least 14 hours far :(.

i configuring build server docker, jenkins, java, scala on top of centos 7.

while working liquibase , jooq:codegen, need have proper mysql(percona:5.6) containers setup, unfortunately, seems official percona image (percona:5.6) not load *.cnf files under /etc/mysql/conf.d properly, think issue, such file permissions issues.

i following instructions from: docker hub: percona percona official: using custom mysql configuration file not work me, , tried many wrong ways, none working.

the file/folders permissions following picture: *.cnf files inside conf.d folder hosting server

after mounted container, following picture: *.cnf files inside /etc/mysql/conf.d inside container

and docker-compose.yaml following: docker-compose.yaml

the default my.cnf provided official percona 5.6 following:

root@25295730da09:/etc/mysql# cat my.cnf # # mysql database server configuration file. # # can copy 1 of: # - "/etc/mysql/my.cnf" set global options, # - "~/.my.cnf" set user-specific options. # # 1 can use long options program supports. # run program --help list of available options , # --print-defaults see understand , use. # # explanations see # http://dev.mysql.com/doc/mysql/en/server-system-variables.html  # passed mysql clients # has been reported passwords should enclosed ticks/quotes # escpecially if contain "#" chars... # remember edit /etc/mysql/debian.cnf when changing socket location. [client] port        = 3306 socket      = /var/run/mysqld/mysqld.sock  # here entries specific programs # following values assume have @ least 32m ram  # formally known [safe_mysqld]. both versions parsed. [mysqld_safe] socket      = /var/run/mysqld/mysqld.sock nice        = 0  [mysqld] skip-host-cache skip-name-resolve # # * basic settings # #user       = mysql pid-file    = /var/run/mysqld/mysqld.pid socket      = /var/run/mysqld/mysqld.sock port        = 3306 basedir     = /usr datadir     = /var/lib/mysql tmpdir      = /tmp lc-messages-dir = /usr/share/mysql skip-external-locking # # instead of skip-networking default listen on # localhost more compatible , not less secure. #bind-address       = 127.0.0.1 # # * fine tuning # key_buffer      = 16m max_allowed_packet  = 16m thread_stack        = 192k thread_cache_size       = 8 # replaces startup script , checks myisam tables if needed # first time touched myisam-recover         = backup #max_connections        = 100 #table_cache            = 64 #thread_concurrency     = 10 # # * query cache configuration # query_cache_limit   = 1m query_cache_size        = 16m # # * logging , replication # # both location gets rotated cronjob. # aware log type performance killer. # of 5.1 can enable log @ runtime! #general_log_file        = /var/log/mysql/mysql.log #general_log             = 1 # # error log - should few entries. # #log_error = /var/log/mysql/error.log # # here can see queries long duration #slow_query_log_file = /var/log/mysql/mysql-slow.log #slow_query_log      = 1 #long_query_time = 2 #log_queries_not_using_indexes # # following can used easy replay backup logs or replication. # note: if setting replication slave, see readme.debian #       other settings may need change. #server-id      = 1 #log_bin            = /var/log/mysql/mysql-bin.log expire_logs_days    = 10 max_binlog_size         = 100m #binlog_do_db       = include_database_name #binlog_ignore_db   = include_database_name # # * innodb # # innodb enabled default 10mb datafile in /var/lib/mysql/. # read manual more innodb related options. there many! # # * security features # # read manual, too, if want chroot! # chroot = /var/lib/mysql/ # # generating ssl certificates recommend openssl gui "tinyca". # # ssl-ca=/etc/mysql/cacert.pem # ssl-cert=/etc/mysql/server-cert.pem # ssl-key=/etc/mysql/server-key.pem    [mysqldump] quick quote-names max_allowed_packet  = 16m  [mysql] #no-auto-rehash # faster start of mysql no tab completition  [isamchk] key_buffer      = 16m  # # * important: additional settings can override file! #   files must end '.cnf', otherwise they'll ignored. # !includedir /etc/mysql/conf.d/ 

and customization following:

root@25295730da09:/etc/mysql/conf.d# cat my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock  general_log_file        = /var/log/mysql/mysqld.log general_log             = 1  log_bin_trust_function_creators=1 max-connections = 5000  max_allowed_packet=32m  # caches , limits # tmp-table-size                 = 32m max-heap-table-size            = 32m query-cache-type               = 0 query-cache-size               = 0 max-connections                = 500 thread-cache-size              = 50 open-files-limit               = 65535 table-definition-cache         = 1024 table-open-cache               = 2048  # innodb # innodb-flush-method            = o_direct innodb-log-files-in-group      = 2 innodb-log-file-size           = 256m innodb-flush-log-at-trx-commit = 1 innodb-file-per-table          = 1 innodb-buffer-pool-size        = 128m   #server_id=1 #log-bin                        = /var/lib/mysql/mysql-bin/mysql-bin expire-logs-days               = 14 sync-binlog                    = 1  # disabling symbolic-links recommended prevent assorted security risks symbolic-links=0  # settings user , group ignored when systemd used (fedora >= 15). # if need run mysqld under different user or group, # customize systemd unit file mysqld according # instructions in http://fedoraproject.org/wiki/systemd user=mysql lower_case_table_names=1 # semisynchronous replication # http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html # uncomment next line on master ;plugin-load=rpl_semi_sync_master=semisync_master.so # uncomment next line on slave ;plugin-load=rpl_semi_sync_slave=semisync_slave.so  # others options semisynchronous replication ;rpl_semi_sync_master_enabled=1 ;rpl_semi_sync_master_timeout=10 ;rpl_semi_sync_slave_enabled=1  # http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html ;performance_schema  # set default server character set  character-set-server = utf8  # set default server collation  collation-server = utf8_unicode_ci  [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid 

and docker versions:

[barry@eb-build linux-build-server]$ docker version client:  version:      1.11.1  api version:  1.23  go version:   go1.5.4  git commit:   5604cbe  built:        wed apr 27 00:34:42 2016  os/arch:      linux/amd64  server:  version:      1.11.1  api version:  1.23  go version:   go1.5.4  git commit:   5604cbe  built:        wed apr 27 00:34:42 2016  os/arch:      linux/amd64 [barry@eb-build linux-build-server]$ docker-compose version docker-compose version 1.7.1, build 0a9ab35 docker-py version: 1.8.1 cpython version: 2.7.9 openssl version: openssl 1.0.1e 11 feb 2013 [barry@eb-build linux-build-server]$ 

the reason because directory: /etc/mysql/conf.d should have @ least 555 permission.

problems solved.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -