当前位置:Gxlcms > 数据库问题 > mysql5.7.1.log数据库改名

mysql5.7.1.log数据库改名

时间:2021-07-01 10:21:17 帮助过:21人阅读

/bin/mysql -uroot -pjjjjj -h10.0.0.22 -e create database if not exists wxqyh_test_0704 list_table=$(/bin/mysql -uroot -pjjjj -h10.0.0.22 -Nse "select table_name from information_schema.TABLES where TABLE_ SCHEMA=wxqyh_test‘") for table in $list_table do #echo $table /bin/mysql -uroot -pjjjj -h10.0.0.22 -e "rename table wxqyh_test.$table to wxqyh_test_0704.$table" done [root@VM_0_134_centos 0704]#

 参考:http://blog.itpub.net/20893244/viewspace-2147259/

mysql5.7.1.log数据库改名

标签:creat   格式化   sql   test   echo   --   net   格式   参数   

人气教程排行