#!/bin/bash

NEW_UPDATED_SQL_FILE_FOLDER=/root/update_5.4.0_5.8.0
for sql_file in $(ls ${NEW_UPDATED_SQL_FILE_FOLDER} |sort -n -k1.1,1.2); do
    echo "current file is $NEW_UPDATED_SQL_FILE_FOLDER/${sql_file}"
    /root/mysql-8.0.27-linux-glibc2.17-x86_64-minimal/bin/mysql -uroot -pQzfXQhd3bQ -h127.0.0.1 -P33306 <"$NEW_UPDATED_SQL_FILE_FOLDER/${sql_file}"
    echo "------------------"
    echo ""
done


/root/mysql-8.0.27-linux-glibc2.17-x86_64-minimal/bin/mysql -uroot -pQzfXQhd3bQ -h127.0.0.1 -P33306