mysql 修改表的每个列的字符类型
#!/bin/sh
for i in $(mysql -uroot -p112358s uarticles_2019 -e "show tables;"|egrep -v Tables)
do
echo "${i}pppp"
kk=$(echo $i|cut -c 10-11)
echo $kk
sleep 3
if [ $kk -gt 11 ];then
echo "${i}uu"
## mysql -uroot -p112358s uarticles_2019 -e "alter table ${i} convert to character set utf8mb4;"
fi
done
aa=$(date "+%Y%m%d")
echo $aa
时来天地皆同力,运去英雄不自由