add slave1
This commit is contained in:
20
docker/mysql-slave1/Dockerfile
Executable file
20
docker/mysql-slave1/Dockerfile
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
ARG MYSQL_VERSION
|
||||||
|
FROM mysql:${MYSQL_VERSION}
|
||||||
|
|
||||||
|
LABEL maintainer="Ludovic CANDELLIER <ludo@huma.net>"
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Set Timezone
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG TZ=UTC
|
||||||
|
ENV TZ ${TZ}
|
||||||
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && chown -R mysql:root /var/lib/mysql/
|
||||||
|
|
||||||
|
COPY my.cnf /etc/mysql/conf.d/my.cnf
|
||||||
|
|
||||||
|
RUN chmod 0444 /etc/mysql/conf.d/my.cnf
|
||||||
|
|
||||||
|
CMD ["mysqld"]
|
||||||
|
|
||||||
|
EXPOSE 3306
|
||||||
15
docker/mysql-slave1/my.cnf
Executable file
15
docker/mysql-slave1/my.cnf
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
# The MySQL Client configuration file.
|
||||||
|
#
|
||||||
|
# For explanations see
|
||||||
|
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
|
||||||
|
|
||||||
|
[mysql]
|
||||||
|
|
||||||
|
[mysqld]
|
||||||
|
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
|
||||||
|
character-set-server=utf8
|
||||||
|
default-authentication-plugin=mysql_native_password
|
||||||
|
#[Must] Start Binary Logs
|
||||||
|
log-bin=mysql-bin
|
||||||
|
#[Must] Set the unique ID of the server, default 1, usually the last segment of IP
|
||||||
|
server-id=3002
|
||||||
Reference in New Issue
Block a user