Well you don’t.
As ‘RENAME’ was thought as bad idea hence not available in later version of mysql.
Easiest way is to dump database and import into new.
Use Linux Command line:
> TABLES=`mysql -u*** -p*** db_name -sNe ‘show tables’;`
> for table in $TABLES; do mysql -u *** -p*** -s -N -e “rename table db_name.$table to new_db_name.$table”; done;
Issues I know:
- It wouldn’t work for view and procs and fucntions.
- It will fail if triggers are used.