
Provide your password in the script to avoid having to enter it for each cycle.ģ. The script above cycles through each table in the database and renames it. 'show tables' | while read table do mysql -u -p

Use a script to rename all the tables in the database: mysql -u -p -sNe Replace with the database username, and with the password for that account. Start by creating a new database: mysql -u -p create It can be used to create a new database, then rename each table from the old database to the new database.ġ. The InnoDB storage engine is a feature included in all versions of MySQL since MySQL 5.5.


However, it can help you keep a clean database environment. Delete the old MySQL database name (optional): mysqladmin -u -p drop Import the dump file into the new database you created: mysql -u -p <. Note: Make sure the database name isn’t already in use.Ĥ.
