Commit febe9a87 authored by Fabio Montefuscolo's avatar Fabio Montefuscolo
Browse files

give up bootstrap zoneinfo

parent ca7afc3a
Pipeline #3153 passed with stage
in 21 seconds
#!/bin/bash
bootstrap_sql_timezone () {
mysql_tzinfo_to_sql /usr/share/zoneinfo 2>&- \
| sed 's/Local time zone must be set--see zic manual page/FCTY/'
}
bootstrap_sql_root_user () {
cat <<-EOSQL
-- What's done in this file shouldn't be replicated
......@@ -40,25 +34,23 @@ bootstrap_database () {
sql_file="${PXC_HOME}/bootstrap.sql"
echo 'USE mysql;' > $sql_file
bootstrap_sql_root_user | tee -a "$sql_file"
bootstrap_sql_root_user >> "$sql_file"
if [ -n "$MYSQL_DATABASE" ];
then
bootstrap_sql_database | tee -a "$sql_file"
bootstrap_sql_database >> "$sql_file"
fi
if [ -n "$MYSQL_USER" ] && [ -n "$MYSQL_PASSWORD" ];
then
bootstrap_sql_user | tee -a $sql_file
bootstrap_sql_user >> $sql_file
if [ -n "$MYSQL_DATABASE" ];
then
bootstrap_sql_grant_user | tee -a "$sql_file"
bootstrap_sql_grant_user >> "$sql_file"
fi
fi
bootstrap_sql_timezone | tee -a "$sql_file"
mysqld \
--defaults-file=/etc/mysql/my.cnf \
--user=mysql \
......@@ -67,5 +59,5 @@ bootstrap_database () {
--datadir=$PXC_DATA \
--basedir=/usr
# rm "$sql_file"
rm "$sql_file"
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment