percona-xtradb-cluster/bootstrap.sh

9 lines
393 B
Bash
Raw Normal View History

2023-09-30 13:01:04 +00:00
#!/usr/bin/env bash
read -p "\$DATA directory: " DATA_DIRECTORY
REALDIR=$(readlink -f "${DATA_DIRECTORY}")
mkdir -p "${DATA_DIRECTORY}"
mkdir "${DATA_DIRECTORY}/conf" "${DATA_DIRECTORY}/cert" "${DATA_DIRECTORY}/mysql"
chown 1001:1001 "${DATA_DIRECTORY}/cert" "${DATA_DIRECTORY}/mysql"
docker run --rm -v "${REALDIR}"/cert:/cert percona/percona-xtradb-cluster:8.0 mysql_ssl_rsa_setup -d /cert