init_mysql_data.sh 396 B

123456789101112131415
  1. #!/bin/sh
  2. Host=${MYSQL_HOST}
  3. User=${MYSQL_USER}
  4. Password=${MYSQL_PASSWORD}
  5. cd /tmp && \
  6. git clone --depth=1 https://github.com/open-falcon/falcon-plus && \
  7. cd /tmp/falcon-plus/ && \
  8. for x in `ls ./scripts/mysql/db_schema/*.sql`; do
  9. echo init mysql table $x ...;
  10. mysql -h${Host} -u${User} -p${Password} < $x;
  11. done
  12. rm -rf /tmp/falcon-plus/