Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion pxc-57/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ RUN groupadd -r mysql && useradd -r -g mysql mysql

RUN apt-get update && apt-get install -y --no-install-recommends \
apt-transport-https ca-certificates \
pwgen wget \
pwgen wget xinetd \
&& rm -rf /var/lib/apt/lists/*

# [elouizbadr] :
# 1- Added "xinetd" on line 8 to install X Internet Services.
# 2- Added following line to install MySQLCheck service to work with HAProxy configuration.
RUN echo "mysqlchk 9200/tcp" >> /etc/services
####################################################################################################

RUN wget https://repo.percona.com/apt/percona-release_0.1-4.jessie_all.deb \
&& dpkg -i percona-release_0.1-4.jessie_all.deb

Expand Down
6 changes: 6 additions & 0 deletions pxc-57/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ fi
GRANT REPLICATION CLIENT ON *.* TO monitor@'%' IDENTIFIED BY 'monitor';
GRANT PROCESS ON *.* TO monitor@localhost IDENTIFIED BY 'monitor';
DROP DATABASE IF EXISTS test ;
-- [elouizbadr] :
-- Add CLusterCheck script username/password to work with HAProxy
GRANT PROCESS ON *.* TO clustercheckuser@'%' IDENTIFIED BY 'clustercheckpassword!';
FLUSH PRIVILEGES ;
EOSQL
if [ ! -z "$MYSQL_ROOT_PASSWORD" ]; then
Expand Down Expand Up @@ -153,6 +156,9 @@ set -e

fi

# [elouizbadr] : Launch xinetd service for HAProxy
/etc/init.d/xinetd start

#--log-error=${DATADIR}error.log
exec mysqld --user=mysql --wsrep_cluster_name=$CLUSTER_NAME --wsrep_cluster_address="gcomm://$cluster_join" --wsrep_sst_method=xtrabackup-v2 --wsrep_sst_auth="xtrabackup:$XTRABACKUP_PASSWORD" --wsrep_node_address="$ipaddr" $CMDARG