How do I remove a prefix from all tables in a MySQL database?

Step 1

Substitute the proper <database> and <prefix length + 1> values in the query below, and then execute the query to generate the renaming query:

SELECT concat(
	'RENAME TABLE ', concat(
		table_name, concat(
			' TO ', concat(substr(table_name, <prefix length + 1>), ';')
FROM information_schema.tables
WHERE '<database>' = table_schema;

Step 2

Execute the renaming query.