Try this shell command.
for table in `mysql -u root -proot -s -N -e "use old_db_name;show tables from old_db_name;"`; do mysql -u root -proot -s -N -e "use old_db_name;rename table old_db_name.$table to new_db_name.$table;"; done;
Enjoy.
on SugarHosts
Try this shell command.
for table in `mysql -u root -proot -s -N -e "use old_db_name;show tables from old_db_name;"`; do mysql -u root -proot -s -N -e "use old_db_name;rename table old_db_name.$table to new_db_name.$table;"; done;
Enjoy.