set binlog config in mysql
keep max binlog file size to 100M. and rotate then in 10 days
This commit is contained in:
@@ -178,7 +178,11 @@ systemctl start nginx
|
||||
# restart mysql to make sure it has latest config
|
||||
if [[ ! -f /etc/mysql/mysql.cnf ]] || ! diff -q "${script_dir}/start/mysql.cnf" /etc/mysql/mysql.cnf >/dev/null; then
|
||||
# wait for all running mysql jobs
|
||||
cp "${script_dir}/start/mysql.cnf" /etc/mysql/mysql.cnf
|
||||
if [[ "${ubuntu_version}" == "20.04" ]]; then
|
||||
cp "${script_dir}/start/mysql/8.0.cnf" /etc/mysql/mysql.cnf
|
||||
else
|
||||
cp "${script_dir}/start/mysql/5.7.cnf" /etc/mysql/mysql.cnf
|
||||
fi
|
||||
while true; do
|
||||
if ! systemctl list-jobs | grep mysql; then break; fi
|
||||
echo "Waiting for mysql jobs..."
|
||||
|
||||
Reference in New Issue
Block a user