Skip to content

Instantly share code, notes, and snippets.

View joostvanveen's full-sized avatar

Joost van Veen joostvanveen

View GitHub Profile
@joostvanveen
joostvanveen / remove-table-prefixes.sql
Last active January 14, 2018 16:51 — forked from molotovbliss/remove-table-prefixes.sql
Remove table prefixes MySQL
-- STEP 1: Set @database, @old_prefix and @new_prefix
-- STEP 2: Execute the query
-- STEP 3: Copy the string that was genereated by the query
-- STEP 4: Run the generated query to rename all tables
-- STEP 5: Use you Party Gun to make it rain!
SET SESSION group_concat_max_len = 999999999;
SET @database = "databasename";
SET @old_prefix = "ma2_";
SET @new_prefix = "";