ITeye博客

批量修改库表字符串脚本

lean1252 · 2014-12-30 18:33 · database · linux · 编程语言 · Markdown

生成可执行语句

mysql -uroot -p67457e226a1a15bd -e 'use jira636;show tables;'|awk -F'|' '{print "mysql -uroot -p67457e226a1a15bd -e \"use jira636;alter table "$1 " default character set utf8;\""}' >[color=orange]batch_mysql_table_charset.sh[/color]
chmod 755 batch_mysql_table_charset.sh

执行脚本batch_mysql_table_charset.sh

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。