Skip to content
Snippets Groups Projects
Commit 7789d8d5 authored by Andrey Postnikov's avatar Andrey Postnikov Committed by Andrey Postnikov
Browse files

mariadb: 10.6 #3420973

(cherry picked from commit aeda9ae2)
parent 98f6ded3
Branches
No related tags found
No related merge requests found
Pipeline #94249 passed
####
FROM docker.io/mariadb:10.6
MAINTAINER drupalci
# Packages..
RUN apt-get -y update || true; \
apt-get -y install netcat psmisc --no-install-recommends && \
rm -rf /var/lib/apt/lists/*
COPY --chmod=644 ./conf/my.cnf /etc/mysql/conf.d/drupalci.cnf
USER root
COPY ./conf/startup.sh /opt/startup.sh
CMD ["/bin/bash", "/opt/startup.sh"]
# Base configuration file for MySQL.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[server]
# Basic Settings.
user = mysql
default_authentication_plugin=mysql_native_password
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
skip-log-bin
# Character sets and SQL mode.
character_set_server = utf8
collation_server = utf8_general_ci
sql_mode = ONLY_FULL_GROUP_BY,TRADITIONAL
# Network.
bind-address = 0.0.0.0
# Basic Tuning.
max_connections = 500
connect_timeout = 5
wait_timeout = 28800
max_allowed_packet = 32M
thread_cache_size = 128
sort_buffer_size = 4M
bulk_insert_buffer_size = 16M
tmp_table_size = 32M
max_heap_table_size = 32M
# MyISAM.
myisam_recover_options = BACKUP
key_buffer_size = 128M
table_open_cache = 400
myisam_sort_buffer_size = 512M
concurrent_insert = 2
read_buffer_size = 2M
read_rnd_buffer_size = 1M
# InnoDB.
default_storage_engine = InnoDB
innodb_buffer_pool_size = 256M
innodb_log_buffer_size = 8M
innodb_file_per_table = 1
innodb_open_files = 400
innodb_io_capacity = 400
innodb_read_io_threads = 16
innodb_write_io_threads = 16
innodb_flush_log_at_trx_commit = 0
innodb_max_dirty_pages_pct = 70
innodb_adaptive_hash_index = 0
[mysqldump]
quick
quote-names
max_allowed_packet = 32M
#!/bin/bash
if [ ! -f /var/lib/mysql/ibdata1 ];
then
echo "rebuilding /var/lib/mysql/ibdata1"
mysql_install_db --user=mysql --basedir=/usr/ --datadir=/var/lib/mysql/
test -e /var/run/mysqld || install -m 755 -o mysql -g root -d /var/run/mysqld
/usr/bin/mysqld_safe &
PID="${!}"
sleep 5s
while ! netcat -vz localhost 3306; do sleep 1; done
mysql -e "CREATE USER 'drupaltestbot'@'%' IDENTIFIED BY 'drupaltestbotpw';"
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'drupaltestbot'@'%' WITH GRANT OPTION; SELECT User FROM mysql.user; FLUSH PRIVILEGES;"
echo "Grants added"
killall mysqld
wait ${PID}
fi
/usr/bin/mysqld_safe;
echo "mysql died at $(date)";
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment