Open your hibernate.cfg file and append this below string to your connection string.
Use Procedure Bodies=false;
Use Procedure Bodies=false;
RENAME TABLE old_db.table TO new_db.table;Here old_db is your old database name and new_db is your new database name. You have to execute this command for each table. And this is the way.
for table in $(mysql -p -s -N -e "show tables from db1"); do mysql -s -N -e "rename table db1.$table to db2.$table"; done;
mysqldump --routines --no-create-info --no-data --no-create-db --skip-opt <database> > outputfile.sql
table.
--no-data = Do not write any row information for the table. This is very usefulif you want to get a dump of only the structure for a table.
--no-create-db = This option suppresses the CREATE DATABASE /*!32312 IF NOT EXISTS*/db_name statements that are otherwise included in the output if the
--databases or --all-databases option is given.
--skip-out = --opt
This option is shorthand; it is the same as specifying
--add-drop-table --add-locks --create-options --disable-keys
--extended-insert --lock-tables --quick --set-charset. It should
give you a fast dump operation and produce a dump file that can be
reloaded into a MySQL server quickly. As of MySQL 4.1, --opt is on
by default, but can be disabled with --skip-opt. To disable only
certain of the options enabled by --opt, use their --skip forms; for
example, --skip-add-drop-table or --skip-quick.