Commit 843424dca42efd319e1a52506157acade60d2451

Authored by Guilherme Andrade Del Cantoni
1 parent 97194710
Exists in master

Correção de parâmetros de inicialização do MySQL

mysql/Dockerfile
... ... @@ -12,6 +12,7 @@ ENV TERM xterm
12 12  
13 13 COPY sei-db-ref-executivo/mysql/sei_3_0_0_BD_Ref_Exec.sql /tmp/sei_mysql.sql
14 14 COPY sei-db-ref-executivo/mysql/sip_3_0_0_BD_Ref_Exec.sql /tmp/sip_mysql.sql
  15 +COPY assets/my.cnf /etc/my.cnf
15 16 COPY install.sh /install.sh
16 17 COPY entrypoint.sh /entrypoint.sh
17 18  
... ...
mysql/assets/my.cnf 0 → 100644
... ... @@ -0,0 +1,35 @@
  1 +# For advice on how to change settings please see
  2 +# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
  3 +
  4 +[mysqld]
  5 +#
  6 +# Remove leading # and set to the amount of RAM for the most important data
  7 +# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
  8 +# innodb_buffer_pool_size = 128M
  9 +#
  10 +# Remove leading # to turn on a very important data integrity option: logging
  11 +# changes to the binary log between backups.
  12 +# log_bin
  13 +#
  14 +# Remove leading # to set options mainly useful for reporting servers.
  15 +# The server defaults are faster for transactions and fast SELECTs.
  16 +# Adjust sizes as needed, experiment to find the optimal values.
  17 +# join_buffer_size = 128M
  18 +# sort_buffer_size = 2M
  19 +# read_rnd_buffer_size = 2M
  20 +datadir=/var/lib/mysql
  21 +socket=/var/lib/mysql/mysql.sock
  22 +
  23 +
  24 +# Disabling symbolic-links is recommended to prevent assorted security risks
  25 +symbolic-links=0
  26 +
  27 +# Recommended in standard MySQL setup
  28 +# sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
  29 +sql-mode=STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
  30 +max_allowed_packet=268435456
  31 +
  32 +[mysqld_safe]
  33 +log-error=/var/log/mysqld.log
  34 +pid-file=/var/run/mysqld/mysqld.pid
  35 +
... ...
mysql/install.sh
... ... @@ -46,10 +46,6 @@ mysql -e "update orgao set sin_autenticar='N' where id_orgao=0;" sip
46 46 # Atribuição de permissões de acesso externo para o usuário root, senha root
47 47 mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;"
48 48  
49   -# Correção de problema com o registro de log de documentos contendo imagens
50   -echo "max_allowed_packet=268435456" >> /etc/my.cnf
51   -echo "sql-mode=STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" >> /etc/my.cnf
52   -
53 49 # Remover arquivos temporários
54 50 rm -rf /tmp/*
55 51 yum clean all
... ...